Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ df = pd.DataFrame({
|
|
20 |
"happiness_index": [7.3, 7.2, 6.5, 7.0, 6.0, 6.3, 7.3, 7.3, 5.9, 5.0]})
|
21 |
# Model Initialisation
|
22 |
llm = models[model_to_run](api_token=API_KEY)
|
23 |
-
pandas_ai = PandasAI(llm, conversational=False, verbose=True)
|
24 |
# Enter Prompt related to data or Select from Pre-defined for demo purposes.
|
25 |
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}
|
26 |
response = pandas_ai.run(df, prompt=prompt,
|
|
|
20 |
"happiness_index": [7.3, 7.2, 6.5, 7.0, 6.0, 6.3, 7.3, 7.3, 5.9, 5.0]})
|
21 |
# Model Initialisation
|
22 |
llm = models[model_to_run](api_token=API_KEY)
|
23 |
+
pandas_ai = PandasAI(llm, save_charts =True, conversational=False, verbose=True)
|
24 |
# Enter Prompt related to data or Select from Pre-defined for demo purposes.
|
25 |
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}
|
26 |
response = pandas_ai.run(df, prompt=prompt,
|