Spaces:
Sleeping
Sleeping
Pclanglais
commited on
Commit
•
34bbc8b
1
Parent(s):
b053d03
Update app.py
Browse files
app.py
CHANGED
@@ -165,7 +165,7 @@ def user(message, history):
|
|
165 |
history_transformer_format = history + [[message, ""]]
|
166 |
|
167 |
print(history_transformer_format)
|
168 |
-
return
|
169 |
|
170 |
# Define the Gradio interface
|
171 |
title = "Tchap"
|
@@ -185,7 +185,7 @@ with gr.Blocks() as demo:
|
|
185 |
user_output = gr.HTML() # To display the user's message
|
186 |
history = gr.State()
|
187 |
|
188 |
-
msg.submit(user, inputs=[msg,
|
189 |
predict, chatbot, chatbot
|
190 |
)
|
191 |
|
|
|
165 |
history_transformer_format = history + [[message, ""]]
|
166 |
|
167 |
print(history_transformer_format)
|
168 |
+
return "", history_transformer_format, source_text
|
169 |
|
170 |
# Define the Gradio interface
|
171 |
title = "Tchap"
|
|
|
185 |
user_output = gr.HTML() # To display the user's message
|
186 |
history = gr.State()
|
187 |
|
188 |
+
msg.submit(user, inputs=[msg, chatbot], outputs=[msg, chatbot, user_output], queue=False).then(
|
189 |
predict, chatbot, chatbot
|
190 |
)
|
191 |
|