Spaces:
Runtime error
Runtime error
Commit
·
8ff0718
1
Parent(s):
2421a83
update hmi
Browse files
app.py
CHANGED
@@ -753,12 +753,14 @@ def chathmi4(message, history2):
|
|
753 |
print("Input Message:", message)
|
754 |
last_request = message
|
755 |
history2 = history2 + [(message, None)]
|
756 |
-
yield ["", history2, gr.update(visible = False), gr.update(visible = True)]
|
|
|
757 |
try:
|
758 |
response = agent.run(message)
|
759 |
time.sleep(0.1)
|
760 |
history2 = history2 + [(None, response)]
|
761 |
-
yield ["", history2, gr.update(visible = True), gr.update(visible = False)]
|
|
|
762 |
print ("response of chatbot:", response)
|
763 |
# real_content = response[-1:]
|
764 |
# print("real_content", real_content)
|
@@ -774,8 +776,7 @@ def chathmi4(message, history2):
|
|
774 |
|
775 |
except Exception as e:
|
776 |
print("chathmi3 error:", e)
|
777 |
-
|
778 |
-
return ["", history2, None, None]
|
779 |
# history = history + [(message, None)]
|
780 |
|
781 |
print("History2: ", history2)
|
|
|
753 |
print("Input Message:", message)
|
754 |
last_request = message
|
755 |
history2 = history2 + [(message, None)]
|
756 |
+
# yield ["", history2, gr.update(visible = False), gr.update(visible = True)]
|
757 |
+
yield ["", history2, None, None]
|
758 |
try:
|
759 |
response = agent.run(message)
|
760 |
time.sleep(0.1)
|
761 |
history2 = history2 + [(None, response)]
|
762 |
+
# yield ["", history2, gr.update(visible = True), gr.update(visible = False)]
|
763 |
+
yield ["", history2, None, None]
|
764 |
print ("response of chatbot:", response)
|
765 |
# real_content = response[-1:]
|
766 |
# print("real_content", real_content)
|
|
|
776 |
|
777 |
except Exception as e:
|
778 |
print("chathmi3 error:", e)
|
779 |
+
|
|
|
780 |
# history = history + [(message, None)]
|
781 |
|
782 |
print("History2: ", history2)
|