Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,11 +63,12 @@ with gr.Blocks(css=CSS, theme=gr.themes.Default()) as app:
|
|
63 |
text_input = gr.Textbox(placeholder="Speak or type your query...")
|
64 |
submit_btn = gr.Button("β‘ Transmit", variant="primary")
|
65 |
|
|
|
66 |
submit_btn.click(
|
67 |
-
lambda msg: (generate_response(msg),
|
68 |
-
inputs=[text_input],
|
69 |
-
outputs=[chatbot]
|
70 |
)
|
71 |
-
|
72 |
if __name__ == "__main__":
|
73 |
-
app.launch(
|
|
|
63 |
text_input = gr.Textbox(placeholder="Speak or type your query...")
|
64 |
submit_btn = gr.Button("β‘ Transmit", variant="primary")
|
65 |
|
66 |
+
# Fixed click handler
|
67 |
submit_btn.click(
|
68 |
+
fn=lambda msg, hist: ((msg, generate_response(msg)), hist + [(msg, generate_response(msg))]),
|
69 |
+
inputs=[text_input, chatbot],
|
70 |
+
outputs=[text_input, chatbot]
|
71 |
)
|
72 |
+
|
73 |
if __name__ == "__main__":
|
74 |
+
app.launch()
|