Spaces:
Sleeping
Sleeping
introduce lambda in text input submit
Browse files- Gradio_UI.py +6 -3
Gradio_UI.py
CHANGED
@@ -309,9 +309,12 @@ class GradioUI:
|
|
309 |
text_input.submit(
|
310 |
self.log_user_message,
|
311 |
[text_input, file_uploads_log],
|
312 |
-
stored_messages,
|
313 |
-
).then(
|
314 |
-
|
|
|
|
|
|
|
315 |
demo.launch(debug=True, share=True, **kwargs)
|
316 |
|
317 |
|
|
|
309 |
text_input.submit(
|
310 |
self.log_user_message,
|
311 |
[text_input, file_uploads_log],
|
312 |
+
[stored_messages,text_input], # Combine the outputs into a list
|
313 |
+
).then(
|
314 |
+
lambda x,y,z : self.interact_with_agent(x[1],y), # Access the second element of the tuple x, which is the text input
|
315 |
+
[stored_messages, stored_messages, chatbot], #Inputs to Lambda
|
316 |
+
stored_messages, #Outputs
|
317 |
+
)
|
318 |
demo.launch(debug=True, share=True, **kwargs)
|
319 |
|
320 |
|