blank image issue on multiple req
Browse files- controller.py +4 -0
controller.py
CHANGED
@@ -605,6 +605,10 @@ def groq_chart(csv_url: str, question: str):
|
|
605 |
except Exception as e:
|
606 |
print(f"Error deleting cache DB file: {e}")
|
607 |
|
|
|
|
|
|
|
|
|
608 |
data = clean_data(csv_url)
|
609 |
with current_groq_chart_lock:
|
610 |
current_api_key = groq_api_keys[current_groq_chart_key_index]
|
|
|
605 |
except Exception as e:
|
606 |
print(f"Error deleting cache DB file: {e}")
|
607 |
|
608 |
+
chart_dir = "generated_charts"
|
609 |
+
if not os.path.exists(chart_dir):
|
610 |
+
os.makedirs(chart_dir)
|
611 |
+
|
612 |
data = clean_data(csv_url)
|
613 |
with current_groq_chart_lock:
|
614 |
current_api_key = groq_api_keys[current_groq_chart_key_index]
|