sxd3125 commited on
Commit
fd4897e
1 Parent(s): a37cfbb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -2,6 +2,7 @@
2
  import pandas as pd
3
  from pandasai import PandasAI
4
  from pandasai.llm.starcoder import Starcoder
 
5
 
6
  # Define List of Models
7
 
@@ -22,5 +23,6 @@ llm = models[model_to_run](api_token=API_KEY)
22
  pandas_ai = PandasAI(llm, conversational=False, verbose=True)
23
  # Enter Prompt related to data or Select from Pre-defined for demo purposes.
24
  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}
25
- pandas_ai.run(df, prompt=prompt,
26
- is_conversational_answer=False)
 
 
2
  import pandas as pd
3
  from pandasai import PandasAI
4
  from pandasai.llm.starcoder import Starcoder
5
+ import gradio as gr
6
 
7
  # Define List of Models
8
 
 
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,
27
+ is_conversational_answer=False)
28
+ print(response)