Somekindofa
commited on
Commit
·
7ab03bd
1
Parent(s):
fde7d53
test
Browse files
app.py
CHANGED
@@ -920,62 +920,61 @@ def append_text_knowledge(file_path: str) -> str:
|
|
920 |
return ""
|
921 |
|
922 |
with gr.Blocks() as demo:
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
)
|
979 |
with gr.Row():
|
980 |
fe = gr.FileExplorer(
|
981 |
glob="**/*.txt",
|
|
|
920 |
return ""
|
921 |
|
922 |
with gr.Blocks() as demo:
|
923 |
+
# knowledge_textbox = gr.Textbox(
|
924 |
+
# label="Knowledge Text",
|
925 |
+
# lines= 20,
|
926 |
+
# visible=False
|
927 |
+
# )
|
928 |
+
chat_interface = gr.ChatInterface(
|
929 |
+
fn=generate,
|
930 |
+
type="messages",
|
931 |
+
multimodal=True,
|
932 |
+
additional_inputs=[
|
933 |
+
gr.Textbox(label="System prompt", lines=6),
|
934 |
+
gr.Slider(
|
935 |
+
label="Max new tokens",
|
936 |
+
minimum=1,
|
937 |
+
maximum=MAX_MAX_NEW_TOKENS,
|
938 |
+
step=1,
|
939 |
+
value=DEFAULT_MAX_NEW_TOKENS,
|
940 |
+
),
|
941 |
+
gr.Slider(
|
942 |
+
label="Temperature",
|
943 |
+
minimum=0.1,
|
944 |
+
maximum=4.0,
|
945 |
+
step=0.1,
|
946 |
+
value=0.6,
|
947 |
+
),
|
948 |
+
gr.Slider(
|
949 |
+
label="Top-p (nucleus sampling)",
|
950 |
+
minimum=0.05,
|
951 |
+
maximum=1.0,
|
952 |
+
step=0.05,
|
953 |
+
value=0.9,
|
954 |
+
),
|
955 |
+
gr.Slider(
|
956 |
+
label="Top-k",
|
957 |
+
minimum=1,
|
958 |
+
maximum=1000,
|
959 |
+
step=1,
|
960 |
+
value=50,
|
961 |
+
),
|
962 |
+
gr.Slider(
|
963 |
+
label="Repetition penalty",
|
964 |
+
minimum=1.0,
|
965 |
+
maximum=2.0,
|
966 |
+
step=0.05,
|
967 |
+
value=1.2,
|
968 |
+
),
|
969 |
+
],
|
970 |
+
stop_btn=True,
|
971 |
+
examples=[
|
972 |
+
["In bullet-points, give me the classes from that Turtle ontology :"]
|
973 |
+
],
|
974 |
+
cache_examples=False,
|
975 |
+
show_progress="full",
|
976 |
+
run_examples_on_click=False
|
977 |
+
)
|
|
|
978 |
with gr.Row():
|
979 |
fe = gr.FileExplorer(
|
980 |
glob="**/*.txt",
|