EnergyWise is a web application that uses artificial intelligence to analyze electricity bills, helping customers better understand their consumption, identify possible errors, and receive personalized advice to save money.
- Bill Analysis: Upload your electricity bill in PDF or image format (JPG, PNG) and get a detailed analysis.
- Bill Comparison: Compare the current bill with a previous one to identify variations in consumption and costs.
- Anomaly Detection: Identify possible errors or anomalies in bills.
- Personalized Advice: Receive suggestions on how to save energy and reduce costs.
- Virtual Assistant: Chat with an AI assistant to get answers to your questions about the bill.
- Responsive Interface: Works on desktop and mobile devices.
- Backend: Flask (REST API), Python
- Frontend: HTML, CSS, JavaScript, Bootstrap 5
- AI/ML: AWS Strands Agents with Claude 3.5 Sonnet on Amazon Bedrock
- OCR: Pytesseract for text extraction from images and PDFs
- Alternative Interface: Streamlit for an alternative version of the application
- Python 3.8+
- Tesseract OCR
- Poppler (for PDF conversion)
- AWS CLI configured with access to Amazon Bedrock
-
Clone the repository:
git clone https://github.com/yourusername/bolletta-analyzer.git cd bolletta-analyzer -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Install Tesseract OCR:
- macOS:
brew install tesseract tesseract-lang - Ubuntu/Debian:
sudo apt-get install tesseract-ocr tesseract-ocr-spa tesseract-ocr-eng - Windows: Download the installer from GitHub
- macOS:
-
Install Poppler:
- macOS:
brew install poppler - Ubuntu/Debian:
sudo apt-get install poppler-utils - Windows: Download from poppler-windows
- macOS:
-
Configure environment variables:
cp .env.example .env
Edit the
.envfile with your AWS credentials and other configurations.
-
Start the Flask application:
python app.py
-
Open your browser and go to
http://localhost:8080
-
Start the Streamlit application:
streamlit run streamlit_app.py
-
The browser will automatically open with the Streamlit application.
bolletta-analyzer/
├── app/ # Flask application
│ ├── __init__.py # Flask app initialization
│ ├── routes.py # API routes
│ ├── services/ # Business logic services
│ │ ├── bill_analyzer.py # Bill analysis with direct Bedrock (backup)
│ │ ├── strands_agent.py # Strands Agent implementation
│ │ └── document_processor.py # Document processing and OCR
│ ├── static/ # Static files (CSS, JS, images)
│ └── templates/ # HTML templates
├── venv/ # Python virtual environment
├── .env # Environment variables
├── app.py # Flask application entry point
├── streamlit_app.py # Alternative Streamlit application
└── README.md # Documentation
The application uses AWS Strands Agents with Amazon Bedrock for bill analysis. Make sure you have:
- An AWS account with access to Amazon Bedrock
- Configured AWS credentials locally (
~/.aws/credentials) - Set the correct region in the
.envfile (default: us-east-1) - Access to the Claude 3.5 Sonnet model on Amazon Bedrock
This project is released under the MIT license.
For questions or support, contact [anespo28@gmail.com].