BizIntel_AI / README.md
mgbam's picture
Update README.md
366223a verified
metadata
title: BizIntel AI Ultra
emoji: πŸ“Š
colorFrom: indigo
colorTo: blue
sdk: docker
app_file: app.py
pinned: false

πŸ“Š BizIntel AI Ultra – Advanced Analytics & Agentic BI

BizIntel AI Ultra turns any data tableβ€”whether a quick CSV upload or a live database tableβ€”into an interactive insight & forecasting workspace powered by:

  • Google Gemini 1.5 Pro β‡’ natural-language strategy briefs
  • ARIMA time-series pipeline β‡’ 90-step (or 3-period) forecasts with model explainability, back-testing, residual ACF & CI bands
  • Plotly Darkβ„’ trend, forecast & EDA visuals
  • Streamlit front-end running inside a Hugging Face Space
  • Modular tools (csv_parser, plot_generator, forecaster, visuals, db_connector) for quick reuse in your own projects

πŸš€ Live Demo (Hugging Face Space)

https://huggingface.co/spaces/your-handle/BizIntel_AI

Upload a CSV or Excel (≀ 500 MB) or connect to PostgreSQL / MySQL / SQL Server / Oracle via a SQLAlchemy URI, select a date column and a numeric metric, and watch:

  1. Trend chart
  2. 90-step forecast with confidence fan, summary stats & interpret-ability
  3. Gemini-generated strategy report
  4. Optional histograms, scatter matrices, correlation heat-maps

✨ Features

Area Details
Data ingest CSV, XLS/XLSX, or DB fetch (sqlalchemy URI)
Sampling Auto-samples giant CSVs (β‰₯ 1 M rows) to avoid OOM
Quick scan Markdown dataset overview: schema, missing %, numeric describe()
Trend Interactive line + markers (Plotly Dark)
Forecast ARIMA(1,1,1) auto-freq, 90-step (daily) or 3-step (monthly, etc)
CI fan, residual ACF plot, 20 % back-test (MAPE, RMSE)
Seasonal decomposition (toggle)
Explainability Model summary table, plain-English coef notes
Gemini 1.5 Pro 5 insights, 3 strategies, risks, extra-visuals β†’ Markdown + download
EDA Histograms (with KDE), box / violin plots, scatter-matrix, corr heat-map
Static images All figures also saved to /tmp/*.png for downstream reports
Extensible Each visual is a standalone helper in tools/

πŸ›  Local Dev Setup

# 1. Clone
git clone https://github.com/your-handle/BizIntel_AI.git
cd BizIntel_AI

# 2. Python env
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# 3. Gemini key
export GEMINI_APIKEY="your_google_ai_studio_key"

# 4. Run
streamlit run app.py
Note : ARIMA & seasonal decomposition come from
statsmodels; Plotly PNG export needs kaleido.
These are included in requirements.txt.

πŸ”Œ Database Connect String Examples
text
Copy code
# PostgreSQL
postgresql+psycopg2://user:password@host:port/dbname

# MySQL
mysql+pymysql://user:password@host/dbname

# SQL Server
mssql+pyodbc://user:password@host:1433/db?driver=ODBC+Driver+17+for+SQL+Server

# Oracle
oracle+cx_oracle://user:password@host:1521/?service_name=ORCL
🌐 Deploying to Hugging Face Spaces
Space β–Έ Create β–Έ Docker template

Push repo (Dockerfile, app.py, tools/, requirements.txt)

Add a secret β†’ GEMINI_APIKEY

Space builds ; enjoy!

πŸ—Ί Project Structure
Copy code
β”œβ”€ app.py
β”œβ”€ requirements.txt
β”œβ”€ Dockerfile
β”œβ”€ tools/
β”‚   β”œβ”€ csv_parser.py
β”‚   β”œβ”€ plot_generator.py
β”‚   β”œβ”€ forecaster.py
β”‚   β”œβ”€ visuals.py
β”‚   └─ db_connector.py
└─ README.md
🀝 Contributing
Issues & PRs are welcome!
Please run black -l 88 and ruff before submitting.

πŸ“œ License
MIT Β© 2025 BizIntel AI Ultra Team