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.Textbox(value="", interactive=False)
|
| 144 |
|
| 145 |
def add_file(history, file, prompt):
|
| 146 |
if (prompt == ""):
|
|
@@ -576,7 +576,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
| 576 |
|
| 577 |
# Chatbot
|
| 578 |
transfer_input_args = dict(
|
| 579 |
-
fn=add_text, inputs=[chatbot, user_input, upload], outputs=[chatbot, user_question, user_input], show_progress=True
|
| 580 |
)
|
| 581 |
|
| 582 |
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="") #gr.Textbox(value="", interactive=False)
|
| 144 |
|
| 145 |
def add_file(history, file, prompt):
|
| 146 |
if (prompt == ""):
|
|
|
|
| 576 |
|
| 577 |
# Chatbot
|
| 578 |
transfer_input_args = dict(
|
| 579 |
+
fn=add_text, inputs=[chatbot, user_input, upload], outputs=[chatbot, user_question, user_input, file_display], show_progress=True
|
| 580 |
)
|
| 581 |
|
| 582 |
predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
|