Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto; border: 1px solid
|
|
| 83 |
)
|
| 84 |
|
| 85 |
send_btn = gr.Button("Send")
|
| 86 |
-
regen_btn = gr.Button("
|
| 87 |
|
| 88 |
system_message = gr.Textbox(value="You are P-MSQ (Messaging Service Query), a friendly AI Chatbot that can help in any situations.", label="System message")
|
| 89 |
|
|
@@ -101,10 +101,7 @@ with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto; border: 1px solid
|
|
| 101 |
return render_message(history), history, "", message
|
| 102 |
|
| 103 |
def regenerate_response(history, last_message, system_message, max_tokens, top_p, temperature):
|
| 104 |
-
|
| 105 |
-
history, assistant_reply = respond(last_message, history, system_message, max_tokens, top_p, temperature)
|
| 106 |
-
return render_message(history), history
|
| 107 |
-
return render_message(history), history
|
| 108 |
|
| 109 |
msg_input.submit(user_interaction,
|
| 110 |
inputs=[msg_input, history_state, system_message, max_tokens, top_p, temperature],
|
|
|
|
| 83 |
)
|
| 84 |
|
| 85 |
send_btn = gr.Button("Send")
|
| 86 |
+
regen_btn = gr.Button("Clear")
|
| 87 |
|
| 88 |
system_message = gr.Textbox(value="You are P-MSQ (Messaging Service Query), a friendly AI Chatbot that can help in any situations.", label="System message")
|
| 89 |
|
|
|
|
| 101 |
return render_message(history), history, "", message
|
| 102 |
|
| 103 |
def regenerate_response(history, last_message, system_message, max_tokens, top_p, temperature):
|
| 104 |
+
return render_message(None), None
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
msg_input.submit(user_interaction,
|
| 107 |
inputs=[msg_input, history_state, system_message, max_tokens, top_p, temperature],
|