Update app.py
Browse files
app.py
CHANGED
@@ -9,16 +9,21 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", n
|
|
9 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
|
10 |
<img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
|
11 |
</a>""")
|
12 |
-
|
13 |
-
with gr.
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
)
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
gr.ChatInterface(random_response,
|
24 |
multimodal=True,
|
@@ -33,17 +38,28 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", n
|
|
33 |
title="Chat interface test",
|
34 |
save_history=True,
|
35 |
)
|
36 |
-
gr.
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
if __name__ == "__main__":
|
49 |
demo.launch()
|
|
|
9 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
|
10 |
<img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
|
11 |
</a>""")
|
12 |
+
|
13 |
+
with gr.Accordion(
|
14 |
+
"API",
|
15 |
+
open=False,
|
16 |
+
):
|
17 |
+
with gr.Row():
|
18 |
+
gr.Textbox(
|
19 |
+
label="API key",
|
20 |
+
scale=4,
|
21 |
+
)
|
22 |
+
gr.Button(
|
23 |
+
value="Apply",
|
24 |
+
scale=1,
|
25 |
+
)
|
26 |
+
gr.Dropdown(label="Choose provider")
|
27 |
|
28 |
gr.ChatInterface(random_response,
|
29 |
multimodal=True,
|
|
|
38 |
title="Chat interface test",
|
39 |
save_history=True,
|
40 |
)
|
41 |
+
with gr.Accordion(
|
42 |
+
"Settings",
|
43 |
+
open=False,
|
44 |
+
):
|
45 |
+
gr.Dropdown(label="Choose model")
|
46 |
+
gr.Textbox(label="System instructions",)
|
47 |
+
gr.Slider(label="temperature",
|
48 |
+
interactive=True,
|
49 |
+
minimum=0,
|
50 |
+
maximum=2,
|
51 |
+
value=0.95)
|
52 |
+
gr.Slider(label="topP",
|
53 |
+
interactive=True,
|
54 |
+
minimum=0,
|
55 |
+
maximum=1,
|
56 |
+
value=0.5)
|
57 |
+
gr.Slider(label="topK",
|
58 |
+
interactive=True,
|
59 |
+
value=100)
|
60 |
+
gr.Checkbox(
|
61 |
+
label="Enable output stream"
|
62 |
+
)
|
63 |
|
64 |
if __name__ == "__main__":
|
65 |
demo.launch()
|