Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,5 @@ pandas_ai = PandasAI(llm, save_charts =True, conversational=False, verbose=True)
|
|
26 |
prompt = 'Plot the histogram of countries showing for each the gdp, using different colors for each bar' #@param [ "What is the relation between GDP and Happines Index", "Plot the histogram of countries showing for each the gpd, using different colors for each bar", "GDP of Top 5 Happiest Countries?"] {allow-input: true}
|
27 |
response = pandas_ai.run(df, prompt=prompt,
|
28 |
is_conversational_answer=False)
|
29 |
-
|
30 |
-
|
31 |
-
for i in w:
|
32 |
-
print(i, ":", w[i])
|
33 |
-
plt.savefig('text.png', response.figure)
|
|
|
26 |
prompt = 'Plot the histogram of countries showing for each the gdp, using different colors for each bar' #@param [ "What is the relation between GDP and Happines Index", "Plot the histogram of countries showing for each the gpd, using different colors for each bar", "GDP of Top 5 Happiest Countries?"] {allow-input: true}
|
27 |
response = pandas_ai.run(df, prompt=prompt,
|
28 |
is_conversational_answer=False)
|
29 |
+
|
30 |
+
response.figure.savefig('chart.jpg')
|
|
|
|
|
|