Update app.py
Browse files
app.py
CHANGED
@@ -70,14 +70,11 @@ with gr.Blocks() as demo:
|
|
70 |
temperature = gr.Slider(0.0, 1.0, label="Temperature", step=0.1, value=0.7)
|
71 |
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.95)
|
72 |
chat_history_state = gr.State([])
|
73 |
-
|
74 |
-
def update_chatbot(
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
outputs[0].update(chat_history)
|
79 |
-
outputs[1].update(chat_history)
|
80 |
-
outputs[2].update("")
|
81 |
|
82 |
submit.click(
|
83 |
fn=update_chatbot,
|
|
|
70 |
temperature = gr.Slider(0.0, 1.0, label="Temperature", step=0.1, value=0.7)
|
71 |
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.95)
|
72 |
chat_history_state = gr.State([])
|
73 |
+
|
74 |
+
def update_chatbot(message, chat_history):
|
75 |
+
_, chat_history, _ = user(message, chat_history)
|
76 |
+
chat_history, _, _ = chat(chat_history, system_msg.value, max_tokens.value, temperature.value, top_p.value, 40, 1.1)
|
77 |
+
return chat_history, chat_history, ""
|
|
|
|
|
|
|
78 |
|
79 |
submit.click(
|
80 |
fn=update_chatbot,
|