mgbam commited on
Commit
318e286
ยท
verified ยท
1 Parent(s): d826a13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,4 +1,4 @@
1
- # app.py โ€” BizIntelย AIย Ultra (Geminiโ€ฏ1.5ย Pro, dateโ€‘column selector)
2
 
3
  import os
4
  import tempfile
@@ -8,7 +8,7 @@ import google.generativeai as genai
8
 
9
  from tools.csv_parser import parse_csv_tool
10
  from tools.plot_generator import plot_sales_tool
11
- from tools.forecaster import forecast_tool # accepts date_col argument
12
 
13
  # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
14
  # 1. GEMINI CONFIG (1.5โ€‘Pro, temperature 0.7)
@@ -19,7 +19,8 @@ gemini = genai.GenerativeModel(
19
  generation_config={
20
  "temperature": 0.7,
21
  "top_p": 0.9,
22
- "response_mime_type": "text/markdown",
 
23
  },
24
  )
25
 
@@ -56,7 +57,7 @@ with st.spinner("๐Ÿ” Parsing CSVโ€ฆ"):
56
  summary_text = parse_csv_tool(csv_path)
57
 
58
  with st.spinner("๐Ÿ“ˆ Generating sales trend chartโ€ฆ"):
59
- _ = plot_sales_tool(csv_path) # saves sales_plot.png
60
 
61
  with st.spinner("๐Ÿ”ฎ Forecasting future metricsโ€ฆ"):
62
  forecast_text = forecast_tool(csv_path, date_col=date_col) # uses chosen column
 
1
+ # app.py โ€” BizIntelย AIย Ultra (Geminiโ€ฏ1.5ย Pro, selectable date column)
2
 
3
  import os
4
  import tempfile
 
8
 
9
  from tools.csv_parser import parse_csv_tool
10
  from tools.plot_generator import plot_sales_tool
11
+ from tools.forecaster import forecast_tool # must accept date_col
12
 
13
  # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
14
  # 1. GEMINI CONFIG (1.5โ€‘Pro, temperature 0.7)
 
19
  generation_config={
20
  "temperature": 0.7,
21
  "top_p": 0.9,
22
+ # Allowed types: text/plain, application/json, etc.
23
+ "response_mime_type": "text/plain",
24
  },
25
  )
26
 
 
57
  summary_text = parse_csv_tool(csv_path)
58
 
59
  with st.spinner("๐Ÿ“ˆ Generating sales trend chartโ€ฆ"):
60
+ _ = plot_sales_tool(csv_path) # generates sales_plot.png
61
 
62
  with st.spinner("๐Ÿ”ฎ Forecasting future metricsโ€ฆ"):
63
  forecast_text = forecast_tool(csv_path, date_col=date_col) # uses chosen column