Spaces:
Running
on
Zero
Running
on
Zero
update app
Browse files
app.py
CHANGED
@@ -774,7 +774,8 @@ class ChatBotUI(object):
|
|
774 |
history.pop(0)
|
775 |
|
776 |
return history, images, history_result, self.get_history(
|
777 |
-
history), gr.update(value=''), gr.update(
|
|
|
778 |
|
779 |
chat_inputs = [
|
780 |
self.extend_prompt, self.history, self.images, self.use_history,
|
@@ -798,7 +799,10 @@ class ChatBotUI(object):
|
|
798 |
inputs=[self.text] + chat_inputs,
|
799 |
outputs=chat_outputs)
|
800 |
|
801 |
-
|
|
|
|
|
|
|
802 |
inputs=[self.retry_msg] + chat_inputs,
|
803 |
outputs=chat_outputs)
|
804 |
|
|
|
774 |
history.pop(0)
|
775 |
|
776 |
return history, images, history_result, self.get_history(
|
777 |
+
history), gr.update(value=''), gr.update(
|
778 |
+
visible=False), retry_msg
|
779 |
|
780 |
chat_inputs = [
|
781 |
self.extend_prompt, self.history, self.images, self.use_history,
|
|
|
799 |
inputs=[self.text] + chat_inputs,
|
800 |
outputs=chat_outputs)
|
801 |
|
802 |
+
def retry_fn(*args):
|
803 |
+
return run_chat(*args)
|
804 |
+
|
805 |
+
self.retry_btn.click(retry_fn,
|
806 |
inputs=[self.retry_msg] + chat_inputs,
|
807 |
outputs=chat_outputs)
|
808 |
|