Spaces:
Runtime error
Runtime error
Add Second Chatbot
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def respond(
|
|
| 42 |
"""
|
| 43 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 44 |
"""
|
| 45 |
-
|
| 46 |
respond,
|
| 47 |
additional_inputs=[
|
| 48 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
|
@@ -58,6 +58,21 @@ demo = gr.ChatInterface(
|
|
| 58 |
],
|
| 59 |
)
|
| 60 |
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
if __name__ == "__main__":
|
| 63 |
-
|
|
|
|
|
|
| 42 |
"""
|
| 43 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 44 |
"""
|
| 45 |
+
demo1 = gr.ChatInterface(
|
| 46 |
respond,
|
| 47 |
additional_inputs=[
|
| 48 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
|
|
|
| 58 |
],
|
| 59 |
)
|
| 60 |
|
| 61 |
+
demo2 = gr.ChatInterface(
|
| 62 |
+
respond,
|
| 63 |
+
additional_inputs=[
|
| 64 |
+
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
| 65 |
+
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 66 |
+
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 67 |
+
gr.Slider(
|
| 68 |
+
minimum=0.1,
|
| 69 |
+
maximum=1.0,
|
| 70 |
+
value=0.95,
|
| 71 |
+
step=0.05,
|
| 72 |
+
label="Top-p (nucleus sampling)",
|
| 73 |
+
),
|
| 74 |
+
],
|
| 75 |
+
)
|
| 76 |
if __name__ == "__main__":
|
| 77 |
+
demo1.launch()
|
| 78 |
+
demo2.launch()
|