Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -135,19 +135,18 @@ with gr.Blocks() as demo:
|
|
| 135 |
#top_p = 0.95
|
| 136 |
|
| 137 |
def submit_message(user_message, chat_history, language):
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
|
| 143 |
submit_button.click(
|
| 144 |
submit_message,
|
| 145 |
-
inputs=[message, chatbot,
|
| 146 |
outputs=[message, chatbot],
|
| 147 |
)
|
| 148 |
message.submit(
|
| 149 |
submit_message,
|
| 150 |
-
inputs=[message, chatbot,
|
| 151 |
outputs=[message, chatbot],
|
| 152 |
)
|
| 153 |
|
|
|
|
| 135 |
#top_p = 0.95
|
| 136 |
|
| 137 |
def submit_message(user_message, chat_history, language):
|
| 138 |
+
assistant_reply = respond(user_message, language, max_tokens, temperature, top_p)
|
| 139 |
+
chat_history = chat_history + [[user_message, assistant_reply]]
|
| 140 |
+
return "", chat_history
|
|
|
|
| 141 |
|
| 142 |
submit_button.click(
|
| 143 |
submit_message,
|
| 144 |
+
inputs=[message, chatbot, language, max_tokens, temperature, top_p],
|
| 145 |
outputs=[message, chatbot],
|
| 146 |
)
|
| 147 |
message.submit(
|
| 148 |
submit_message,
|
| 149 |
+
inputs=[message, chatbot, language, max_tokens, temperature, top_p],
|
| 150 |
outputs=[message, chatbot],
|
| 151 |
)
|
| 152 |
|