Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -9,28 +9,115 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
-
#
|
13 |
|
14 |
-
**
|
|
|
|
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
|
|
|
|
19 |
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
- Upload CSV or connect to databases (PostgreSQL, MySQL, MSSQL, Oracle, SQLite)
|
27 |
-
- ADK multi-agent orchestration: trend analysis, forecasting, strategic insights
|
28 |
-
- Interactive Streamlit dashboard with visual charts
|
29 |
-
- Hugging Face Spaces Docker-based deployment
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
|
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
+
# π BizIntel AI Ultra β Advanced Analytics & Agentic BI
|
13 |
|
14 |
+
**BizIntel AI Ultra** turns any data tableβwhether a quick CSV upload or a live
|
15 |
+
database tableβinto an interactive **insight & forecasting workspace** powered
|
16 |
+
by:
|
17 |
|
18 |
+
* **Google Gemini 1.5 Pro** β natural-language strategy briefs
|
19 |
+
* **ARIMA time-series pipeline** β 90-step (or 3-period) forecasts with
|
20 |
+
model explainability, back-testing, residual ACF & CI bands
|
21 |
+
* **Plotly Darkβ’** trend, forecast & EDA visuals
|
22 |
+
* **Streamlit** front-end running inside a Hugging Face Space
|
23 |
+
* **Modular tools** (`csv_parser`, `plot_generator`, `forecaster`,
|
24 |
+
`visuals`, `db_connector`) for quick reuse in your own projects
|
25 |
|
26 |
+
---
|
27 |
+
|
28 |
+
## π Live Demo (Hugging Face Space)
|
29 |
+
|
30 |
+
<https://huggingface.co/spaces/your-handle/BizIntel_AI>
|
31 |
+
|
32 |
+
Upload a CSV or Excel (β€ 500 MB) **or** connect to PostgreSQL / MySQL /
|
33 |
+
SQL Server / Oracle via a SQLAlchemy URI, select a date column and a numeric
|
34 |
+
metric, and watch:
|
35 |
+
|
36 |
+
1. Trend chart
|
37 |
+
2. 90-step forecast with confidence fan, summary stats & interpret-ability
|
38 |
+
3. Gemini-generated strategy report
|
39 |
+
4. Optional histograms, scatter matrices, correlation heat-maps
|
40 |
+
|
41 |
+
---
|
42 |
+
|
43 |
+
## β¨ Features
|
44 |
+
|
45 |
+
| Area | Details |
|
46 |
+
| ---- | ------- |
|
47 |
+
| **Data ingest** | CSV, XLS/XLSX, or DB fetch (`sqlalchemy` URI) |
|
48 |
+
| **Sampling** | Auto-samples giant CSVs (β₯ 1 M rows) to avoid OOM |
|
49 |
+
| **Quick scan** | Markdown dataset overview: schema, missing %, numeric `describe()` |
|
50 |
+
| **Trend** | Interactive line + markers (Plotly Dark) |
|
51 |
+
| **Forecast** | ARIMA(1,1,1) auto-freq, 90-step (daily) or 3-step (monthly, etc) |
|
52 |
+
| | CI fan, residual ACF plot, 20 % back-test (MAPE, RMSE) |
|
53 |
+
| | Seasonal decomposition (toggle) |
|
54 |
+
| **Explainability** | Model summary table, plain-English coef notes |
|
55 |
+
| **Gemini 1.5 Pro** | 5 insights, 3 strategies, risks, extra-visuals β Markdown + download |
|
56 |
+
| **EDA** | Histograms (with KDE), box / violin plots, scatter-matrix, corr heat-map |
|
57 |
+
| **Static images** | All figures also saved to `/tmp/*.png` for downstream reports |
|
58 |
+
| **Extensible** | Each visual is a standalone helper in `tools/` |
|
59 |
+
|
60 |
+
---
|
61 |
+
|
62 |
+
## π Local Dev Setup
|
63 |
+
|
64 |
+
```bash
|
65 |
+
# 1. Clone
|
66 |
+
git clone https://github.com/your-handle/BizIntel_AI.git
|
67 |
+
cd BizIntel_AI
|
68 |
+
|
69 |
+
# 2. Python env
|
70 |
+
python -m venv .venv
|
71 |
+
source .venv/bin/activate
|
72 |
+
pip install -r requirements.txt
|
73 |
+
|
74 |
+
# 3. Gemini key
|
75 |
+
export GEMINI_APIKEY="your_google_ai_studio_key"
|
76 |
+
|
77 |
+
# 4. Run
|
78 |
+
streamlit run app.py
|
79 |
+
Note : ARIMA & seasonal decomposition come from
|
80 |
+
statsmodels; Plotly PNG export needs kaleido.
|
81 |
+
These are included in requirements.txt.
|
82 |
+
|
83 |
+
π Database Connect String Examples
|
84 |
+
text
|
85 |
+
Copy code
|
86 |
+
# PostgreSQL
|
87 |
+
postgresql+psycopg2://user:password@host:port/dbname
|
88 |
+
|
89 |
+
# MySQL
|
90 |
+
mysql+pymysql://user:password@host/dbname
|
91 |
|
92 |
+
# SQL Server
|
93 |
+
mssql+pyodbc://user:password@host:1433/db?driver=ODBC+Driver+17+for+SQL+Server
|
94 |
|
95 |
+
# Oracle
|
96 |
+
oracle+cx_oracle://user:password@host:1521/?service_name=ORCL
|
97 |
+
π Deploying to Hugging Face Spaces
|
98 |
+
Space βΈ Create βΈ Docker template
|
99 |
|
100 |
+
Push repo (Dockerfile, app.py, tools/, requirements.txt)
|
101 |
|
102 |
+
Add a secret β GEMINI_APIKEY
|
103 |
|
104 |
+
Space builds ; enjoy!
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
πΊ Project Structure
|
107 |
+
Copy code
|
108 |
+
ββ app.py
|
109 |
+
ββ requirements.txt
|
110 |
+
ββ Dockerfile
|
111 |
+
ββ tools/
|
112 |
+
β ββ csv_parser.py
|
113 |
+
β ββ plot_generator.py
|
114 |
+
β ββ forecaster.py
|
115 |
+
β ββ visuals.py
|
116 |
+
β ββ db_connector.py
|
117 |
+
ββ README.md
|
118 |
+
π€ Contributing
|
119 |
+
Issues & PRs are welcome!
|
120 |
+
Please run black -l 88 and ruff before submitting.
|
121 |
|
122 |
+
π License
|
123 |
+
MIT Β© 2025 BizIntel AI Ultra Team
|