Update app.py
Browse files
app.py
CHANGED
@@ -111,11 +111,12 @@ def create_deepseek_interface():
|
|
111 |
chatbot = gr.Chatbot(
|
112 |
height=500,
|
113 |
show_label=False,
|
114 |
-
container=True
|
|
|
115 |
)
|
116 |
|
117 |
# Error message display
|
118 |
-
error_display = gr.Markdown(
|
119 |
|
120 |
# Input area
|
121 |
with gr.Row():
|
@@ -157,16 +158,16 @@ def create_deepseek_interface():
|
|
157 |
submit.click(
|
158 |
process_submission,
|
159 |
inputs=[msg, chatbot, api_key],
|
160 |
-
outputs=[chatbot
|
161 |
-
postprocess=lambda _:
|
162 |
)
|
163 |
|
164 |
# Also allow pressing Enter to submit
|
165 |
msg.submit(
|
166 |
process_submission,
|
167 |
inputs=[msg, chatbot, api_key],
|
168 |
-
outputs=[chatbot
|
169 |
-
postprocess=lambda _:
|
170 |
)
|
171 |
|
172 |
return demo
|
|
|
111 |
chatbot = gr.Chatbot(
|
112 |
height=500,
|
113 |
show_label=False,
|
114 |
+
container=True,
|
115 |
+
type="messages"
|
116 |
)
|
117 |
|
118 |
# Error message display
|
119 |
+
error_display = gr.Markdown("")
|
120 |
|
121 |
# Input area
|
122 |
with gr.Row():
|
|
|
158 |
submit.click(
|
159 |
process_submission,
|
160 |
inputs=[msg, chatbot, api_key],
|
161 |
+
outputs=[chatbot],
|
162 |
+
postprocess=lambda _: "" # Clear input box after sending
|
163 |
)
|
164 |
|
165 |
# Also allow pressing Enter to submit
|
166 |
msg.submit(
|
167 |
process_submission,
|
168 |
inputs=[msg, chatbot, api_key],
|
169 |
+
outputs=[chatbot],
|
170 |
+
postprocess=lambda _: "" # Clear input box after sending
|
171 |
)
|
172 |
|
173 |
return demo
|