Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,27 +55,22 @@ def clear_chat():
|
|
| 55 |
"""
|
| 56 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 57 |
"""
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
clear_button.click(
|
| 76 |
-
clear_chat,
|
| 77 |
-
outputs=[message, chatbot]
|
| 78 |
-
)
|
| 79 |
|
| 80 |
|
| 81 |
if __name__ == "__main__":
|
|
|
|
| 55 |
"""
|
| 56 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 57 |
"""
|
| 58 |
+
demo = gr.ChatInterface(
|
| 59 |
+
respond,
|
| 60 |
+
additional_inputs=[
|
| 61 |
+
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
| 62 |
+
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 63 |
+
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 64 |
+
gr.Slider(
|
| 65 |
+
minimum=0.1,
|
| 66 |
+
maximum=1.0,
|
| 67 |
+
value=0.95,
|
| 68 |
+
step=0.05,
|
| 69 |
+
label="Top-p (nucleus sampling)",
|
| 70 |
+
),
|
| 71 |
+
gr.Dropdown(choices=["friendly", "professional", "humorous", "serious"], value="friendly", label="Personality"),
|
| 72 |
+
]
|
| 73 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
if __name__ == "__main__":
|