Update main.py
Browse files
main.py
CHANGED
@@ -67,6 +67,7 @@ async def get_image_for_text(email,query,file: UploadFile = File(...)):
|
|
67 |
code_to_exec = "import matplotlib.pyplot as plt\nimport seaborn as sns\n"
|
68 |
code_to_exec = code_to_exec + sdf.last_code_generated.replace("dfs[0]","dfs")
|
69 |
code_to_exec = code_to_exec.replace("exports/charts/temp_chart.png",email+file_name+".png")
|
|
|
70 |
|
71 |
print(code_to_exec)
|
72 |
local_vars = {'dfs': df}
|
|
|
67 |
code_to_exec = "import matplotlib.pyplot as plt\nimport seaborn as sns\n"
|
68 |
code_to_exec = code_to_exec + sdf.last_code_generated.replace("dfs[0]","dfs")
|
69 |
code_to_exec = code_to_exec.replace("exports/charts/temp_chart.png",email+file_name+".png")
|
70 |
+
code_to_exec = code_to_exec+f"\nplt.savefig('{email+file_name}.png')"
|
71 |
|
72 |
print(code_to_exec)
|
73 |
local_vars = {'dfs': df}
|