Soumik555 commited on
Commit
d6a6b5c
·
1 Parent(s): 9de29eb

blank image issue on multiple req

Browse files
Files changed (1) hide show
  1. 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]