Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,17 +10,40 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", n
|
|
| 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 |
gr.ChatInterface(random_response,
|
| 14 |
multimodal=True,
|
| 15 |
-
chatbot=gr.Chatbot(
|
|
|
|
|
|
|
| 16 |
type="messages",
|
| 17 |
-
textbox=gr.MultimodalTextbox(
|
|
|
|
|
|
|
| 18 |
editable=True,
|
| 19 |
title="Chat interface test",
|
| 20 |
save_history=True,
|
| 21 |
)
|
| 22 |
gr.Textbox(label="System instructions",)
|
| 23 |
-
gr.Slider(label="temperature",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
if __name__ == "__main__":
|
| 26 |
-
demo.launch()
|
|
|
|
| 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.Row():
|
| 14 |
+
gr.Textbox(
|
| 15 |
+
label="API key",
|
| 16 |
+
scale=4,
|
| 17 |
+
)
|
| 18 |
+
gr.Button(
|
| 19 |
+
value="Apply",
|
| 20 |
+
scale=1,
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
gr.ChatInterface(random_response,
|
| 24 |
multimodal=True,
|
| 25 |
+
chatbot=gr.Chatbot(
|
| 26 |
+
label="output",
|
| 27 |
+
),
|
| 28 |
type="messages",
|
| 29 |
+
textbox=gr.MultimodalTextbox(
|
| 30 |
+
label="input",
|
| 31 |
+
),
|
| 32 |
editable=True,
|
| 33 |
title="Chat interface test",
|
| 34 |
save_history=True,
|
| 35 |
)
|
| 36 |
gr.Textbox(label="System instructions",)
|
| 37 |
+
gr.Slider(label="temperature",
|
| 38 |
+
minimum=0,
|
| 39 |
+
maximum=2,
|
| 40 |
+
value=0.95)
|
| 41 |
+
gr.Slider(label="topP",
|
| 42 |
+
minimum=0,
|
| 43 |
+
maximum=1,
|
| 44 |
+
value=0.5)
|
| 45 |
+
gr.Slider(label="topK",
|
| 46 |
+
value=100)
|
| 47 |
|
| 48 |
if __name__ == "__main__":
|
| 49 |
+
demo.launch()
|