Spaces:
Sleeping
Sleeping
littlebird13
commited on
Commit
•
8fd715d
1
Parent(s):
fa96718
Update app.py
Browse files
app.py
CHANGED
@@ -77,12 +77,16 @@ with gr.Blocks() as demo:
|
|
77 |
modify_system = gr.Button("🛠️ Set system prompt and clear history", scale=2)
|
78 |
system_state = gr.Textbox(value=default_system, visible=False)
|
79 |
chatbot = gr.Chatbot(label='qwen2-72B-instruct')
|
80 |
-
textbox = gr.Textbox(lines=
|
81 |
|
82 |
with gr.Row():
|
83 |
clear_history = gr.Button("🧹 Clear history")
|
84 |
sumbit = gr.Button("🚀 Send")
|
85 |
|
|
|
|
|
|
|
|
|
86 |
sumbit.click(model_chat,
|
87 |
inputs=[textbox, chatbot, system_state],
|
88 |
outputs=[textbox, chatbot, system_input],
|
|
|
77 |
modify_system = gr.Button("🛠️ Set system prompt and clear history", scale=2)
|
78 |
system_state = gr.Textbox(value=default_system, visible=False)
|
79 |
chatbot = gr.Chatbot(label='qwen2-72B-instruct')
|
80 |
+
textbox = gr.Textbox(lines=1, label='Input')
|
81 |
|
82 |
with gr.Row():
|
83 |
clear_history = gr.Button("🧹 Clear history")
|
84 |
sumbit = gr.Button("🚀 Send")
|
85 |
|
86 |
+
textbox.submit(model_chat,
|
87 |
+
inputs=[textbox, chatbot, system_state],
|
88 |
+
outputs=[textbox, chatbot, system_input])
|
89 |
+
|
90 |
sumbit.click(model_chat,
|
91 |
inputs=[textbox, chatbot, system_state],
|
92 |
outputs=[textbox, chatbot, system_input],
|