Update app.py
Browse files
app.py
CHANGED
@@ -140,7 +140,7 @@ def add_text(history, prompt, file):
|
|
140 |
else:
|
141 |
history = history + [((file.name,), None), (prompt, None)]
|
142 |
|
143 |
-
return history, prompt, "", gr.File(value=
|
144 |
|
145 |
def add_file(history, file, prompt):
|
146 |
if (prompt == ""):
|
@@ -579,7 +579,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
579 |
|
580 |
# Chatbot
|
581 |
transfer_input_args = dict(
|
582 |
-
fn=add_text, inputs=[chatbot, user_input, upload], outputs=[chatbot,
|
583 |
)
|
584 |
|
585 |
predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
|
|
|
140 |
else:
|
141 |
history = history + [((file.name,), None), (prompt, None)]
|
142 |
|
143 |
+
return history, prompt, "", gr.File(value=None) #gr.Textbox(value="", interactive=False)
|
144 |
|
145 |
def add_file(history, file, prompt):
|
146 |
if (prompt == ""):
|
|
|
579 |
|
580 |
# Chatbot
|
581 |
transfer_input_args = dict(
|
582 |
+
fn=add_text, inputs=[chatbot, user_input, upload], outputs=[chatbot, user_question, user_input, file_display], show_progress=True
|
583 |
)
|
584 |
|
585 |
predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
|