AI Smart Meter Advisor is a web-based application that predicts electricity usage for the next 7 days using machine learning and provides actionable energy-saving tips. It is designed to help households and small businesses monitor consumption, identify peak usage days, and adopt efficient energy habits.
The app features an engaging neon-themed UI, interactive charts, and AI-powered advice per day.
🌟 Features
Historical Usage: View past electricity consumption in an interactive table.
7-Day Forecast: Predict daily electricity usage (kWh) using Random Forest regression.
Peak vs Normal Day Detection: Highlights days with higher-than-average usage.
AI Energy Tips: Each day comes with 3 practical, actionable tips generated by a Large Language Model (LLM).
Engaging UI: Neon-style design, interactive Plotly charts, and cards for key metrics.
Forecast Explanation: Friendly, concise paragraph summarizing the week's energy usage.
🛠 Tech Stack
Frontend & Deployment: Streamlit
Backend & ML: Python, scikit-learn (Random Forest Regressor)
Data Visualization: Plotly Express
AI Advice: HuggingFace Large Language Model (deepseek-ai/DeepSeek-V3.2)
Data Storage: CSV (tracked via Git LFS)
📂 File Structure ai-smart-meter-advisor/ │ ├─ app.py # Main Streamlit app ├─ predictor.py # ML model, data loading, AI advice generation ├─ energy_data.csv # Historical electricity usage data (via Git LFS) ├─ main.env # Environment file containing HuggingFace token ├─ requirements.txt # Python dependencies ├─ README.md # Project documentation
🚀 Installation & Setup
Clone the repository
git clone https://github.com//ai-smart-meter-advisor.git cd ai-smart-meter-advisor
Install dependencies
pip install -r requirements.txt
Set HuggingFace API Token
Create a main.env file (if not already present) in the repo root:
HF_TOKEN=your_huggingface_api_token
The app will load the token using Python’s os.environ.
Run the app locally
streamlit run app.py
📊 How it Works
Loads historical electricity usage data from energy_data.csv.
Calculates daily energy consumption in kWh and average usage.
Classifies days as Peak or Normal based on usage.
Trains a Random Forest model to predict energy consumption for the next 7 days.
Generates 3 AI-powered energy-saving tips per day using HuggingFace LLM.
Displays data, predictions, and advice in an interactive Streamlit dashboard.
💡 Usage Tips
Focus on Peak days: Reduce unnecessary loads and use energy-efficient appliances.
Follow daily AI tips for consistent energy savings.
Use historical insights to identify trends in your consumption.
⚙️ Dependencies
Python 3.10+
streamlit
pandas
numpy
scikit-learn
plotly
requests
Install all dependencies via:




