Update app.py
Browse files
app.py
CHANGED
@@ -125,8 +125,10 @@ def add_file(history, task_history, file):
|
|
125 |
return history, task_history
|
126 |
|
127 |
def predict(_chatbot, task_history) -> tuple:
|
128 |
-
|
|
|
129 |
chat_query, chat_response = _chatbot[-1]
|
|
|
130 |
if isinstance(chat_query, tuple):
|
131 |
chat_query = chat_query[0]
|
132 |
query = [{'image': chat_query}]
|
|
|
125 |
return history, task_history
|
126 |
|
127 |
def predict(_chatbot, task_history) -> tuple:
|
128 |
+
if not _chatbot:
|
129 |
+
return _chatbot, task_history
|
130 |
chat_query, chat_response = _chatbot[-1]
|
131 |
+
print("predict called")
|
132 |
if isinstance(chat_query, tuple):
|
133 |
chat_query = chat_query[0]
|
134 |
query = [{'image': chat_query}]
|