Spaces:
Runtime error
Runtime error
Commit
·
5bf7302
1
Parent(s):
069c794
add file check
Browse files
app.py
CHANGED
@@ -527,8 +527,15 @@ def chathmi2(message, history):
|
|
527 |
response = output
|
528 |
yield response
|
529 |
print ("response of chatbot:", response)
|
530 |
-
|
531 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
532 |
if len(Audio_output) > 0:
|
533 |
# time.sleep(0.5)
|
534 |
# yield Audio_output
|
|
|
527 |
response = output
|
528 |
yield response
|
529 |
print ("response of chatbot:", response)
|
530 |
+
print ("\n")
|
531 |
+
# real_content = response[-1:]
|
532 |
+
# print("real_content", real_content)
|
533 |
+
try:
|
534 |
+
temp = response.split("(sandbox:/")[1] # (sandbox:/sample-20230805-0807.wav)
|
535 |
+
file_name = temp.split(")")[0]
|
536 |
+
print("file_name:", file_name)
|
537 |
+
except:
|
538 |
+
pass
|
539 |
if len(Audio_output) > 0:
|
540 |
# time.sleep(0.5)
|
541 |
# yield Audio_output
|