nolanzandi commited on
Commit
eda5f19
·
verified ·
1 Parent(s): 76271c7

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. functions/chart_functions.py +3 -3
app.py CHANGED
@@ -38,9 +38,9 @@ with gr.Blocks(css=css, delete_cache=(3600,3600)) as demo:
38
  Upload a data file and chat with our virtual data analyst to get insights on your data set.
39
  Try a sample file to get started!</p>
40
  <div style="margin:auto;max-width: 500px;">
41
- <p style="margin:0;font-style:italic;">Currently accepts CSV, TSV, TXT, XLS, XLSX, XML, and JSON files.</p>
42
- <p style="margin:0;font-style:italic;">Can run SQL queries, linear regressions, and analyze the results.</p>
43
- <p style="margin:0;font-style:italic;">Can generate scatter plots, line charts, pie charts, bar graphs, histograms, time series, and more.
44
  New visualizations types added regularly.</p>
45
  </div>
46
  <p style='text-align:center;'>This application is under active development. If you experience bugs with use,
 
38
  Upload a data file and chat with our virtual data analyst to get insights on your data set.
39
  Try a sample file to get started!</p>
40
  <div style="margin:auto;max-width: 500px;">
41
+ <p style="margin:0;font-style:italic;line-height:1;">Currently accepts CSV, TSV, TXT, XLS, XLSX, XML, and JSON files.</p>
42
+ <p style="margin:0;font-style:italic;line-height:1;">Can run SQL queries, linear regressions, and analyze the results.</p>
43
+ <p style="margin:0;font-style:italic;line-height:1;">Can generate scatter plots, line charts, pie charts, bar graphs, histograms, time series, and more.
44
  New visualizations types added regularly.</p>
45
  </div>
46
  <p style='text-align:center;'>This application is under active development. If you experience bugs with use,
functions/chart_functions.py CHANGED
@@ -120,7 +120,7 @@ def scatter_chart_generation_func(x_column: List[str], y_column: str, session_ha
120
  """
121
  return {"reply": reply}
122
 
123
- def line_chart_generation_func(data: List[dict], x_column: str, y_column: str, session_hash, layout: List[dict]=[{}],
124
  category: str=""):
125
  try:
126
  dir_path = TEMP_DIR / str(session_hash)
@@ -171,7 +171,7 @@ def line_chart_generation_func(data: List[dict], x_column: str, y_column: str, s
171
  """
172
  return {"reply": reply}
173
 
174
- def bar_chart_generation_func(data: List[dict], x_column: str, y_column: str, session_hash, layout: List[dict]=[{}],
175
  category: str="", facet_row: str="", facet_col: str=""):
176
  try:
177
  dir_path = TEMP_DIR / str(session_hash)
@@ -226,7 +226,7 @@ def bar_chart_generation_func(data: List[dict], x_column: str, y_column: str, se
226
  """
227
  return {"reply": reply}
228
 
229
- def pie_chart_generation_func(data: List[dict], values: str, names: str, session_hash, layout: List[dict]=[{}]):
230
  try:
231
  dir_path = TEMP_DIR / str(session_hash)
232
  chart_path = f'{dir_path}/chart.html'
 
120
  """
121
  return {"reply": reply}
122
 
123
+ def line_chart_generation_func(x_column: str, y_column: str, session_hash, data: List[dict]=[{}], layout: List[dict]=[{}],
124
  category: str=""):
125
  try:
126
  dir_path = TEMP_DIR / str(session_hash)
 
171
  """
172
  return {"reply": reply}
173
 
174
+ def bar_chart_generation_func(x_column: str, y_column: str, session_hash, data: List[dict]=[{}], layout: List[dict]=[{}],
175
  category: str="", facet_row: str="", facet_col: str=""):
176
  try:
177
  dir_path = TEMP_DIR / str(session_hash)
 
226
  """
227
  return {"reply": reply}
228
 
229
+ def pie_chart_generation_func(values: str, names: str, session_hash, data: List[dict]=[{}], layout: List[dict]=[{}]):
230
  try:
231
  dir_path = TEMP_DIR / str(session_hash)
232
  chart_path = f'{dir_path}/chart.html'