Spaces:
Runtime error
Runtime error
Commit
·
97582ea
1
Parent(s):
1d3b1f7
update chathmi2
Browse files
app.py
CHANGED
@@ -526,10 +526,14 @@ def chathmi2(message, history):
|
|
526 |
time.sleep(0.3)
|
527 |
response = output
|
528 |
yield response
|
|
|
|
|
|
|
529 |
if len(Audio_output) > 0:
|
530 |
# time.sleep(0.5)
|
531 |
# yield Audio_output
|
532 |
Audio_output = []
|
|
|
533 |
print("History: ", history)
|
534 |
print("-" * 20)
|
535 |
print("-" * 20)
|
@@ -643,9 +647,8 @@ with gr.Blocks() as demo:
|
|
643 |
# logs = gr.Textbox()
|
644 |
logs = gr.Textbox()
|
645 |
upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
646 |
-
main.chatbot.change(LinkElement, main.chatbot, None)
|
647 |
agentchoice.change(SetAgent, agentchoice, None)
|
648 |
-
demo.load(read_logs, None, logs, every=
|
649 |
|
650 |
|
651 |
|
|
|
526 |
time.sleep(0.3)
|
527 |
response = output
|
528 |
yield response
|
529 |
+
print ("response of chatbot:", response)
|
530 |
+
real_content = response[-1:][1]
|
531 |
+
print("real_content", real_content)
|
532 |
if len(Audio_output) > 0:
|
533 |
# time.sleep(0.5)
|
534 |
# yield Audio_output
|
535 |
Audio_output = []
|
536 |
+
|
537 |
print("History: ", history)
|
538 |
print("-" * 20)
|
539 |
print("-" * 20)
|
|
|
647 |
# logs = gr.Textbox()
|
648 |
logs = gr.Textbox()
|
649 |
upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
|
|
|
650 |
agentchoice.change(SetAgent, agentchoice, None)
|
651 |
+
demo.load(read_logs, None, logs, every=1)
|
652 |
|
653 |
|
654 |
|