Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -759,9 +759,12 @@ def answer_question_thread(user_question, chatbot,audio=None):
|
|
759 |
except Exception as e:
|
760 |
print(f"Error loading image file: {e}")
|
761 |
response_text = "Chart generation failed. Please try again."
|
762 |
-
|
|
|
763 |
return user_question, response_text
|
764 |
else:
|
|
|
|
|
765 |
return user_question, response_text
|
766 |
# response_text = response_text.replace('\n', ' ').replace(' ', ' ').strip()
|
767 |
# return response_text
|
|
|
759 |
except Exception as e:
|
760 |
print(f"Error loading image file: {e}")
|
761 |
response_text = "Chart generation failed. Please try again."
|
762 |
+
if("max iterations" in response_text):
|
763 |
+
print("max iterations error")
|
764 |
return user_question, response_text
|
765 |
else:
|
766 |
+
if("max iterations" in response_text):
|
767 |
+
print("max iterations error")
|
768 |
return user_question, response_text
|
769 |
# response_text = response_text.replace('\n', ' ').replace(' ', ' ').strip()
|
770 |
# return response_text
|