Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -99,13 +99,12 @@ def predict(_chatbot, task_history, user_input):
|
|
99 |
audio_clip.export(filename, format=format)
|
100 |
_chatbot[-1] = (_parse_text(query), chat_response)
|
101 |
_chatbot.append((None, (str(filename),)))
|
102 |
-
|
103 |
-
_chatbot
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
return _chatbot
|
109 |
|
110 |
def regenerate(_chatbot, task_history):
|
111 |
print("Regenerate - Start: task_history =", task_history)
|
|
|
99 |
audio_clip.export(filename, format=format)
|
100 |
_chatbot[-1] = (_parse_text(query), chat_response)
|
101 |
_chatbot.append((None, (str(filename),)))
|
102 |
+
if not _chatbot:
|
103 |
+
_chatbot = [("", "")]
|
104 |
+
|
105 |
+
print("Predict - End: task_history =", task_history)
|
106 |
+
return _chatbot[-1][1], _chatbot
|
107 |
+
|
|
|
108 |
|
109 |
def regenerate(_chatbot, task_history):
|
110 |
print("Regenerate - Start: task_history =", task_history)
|