EcoChain AI is an intelligent logistics tool that helps companies automate carbon footprint analysis. It replaces manual spreadsheet work by using AI to read PDF invoices and Geospatial Engines to calculate precise shipment routes.
- 📄 AI Invoice Extraction: Uses Google Gemini 1.5 to extract Origin, Destination, Weight, and Mode from raw PDF files.
- 🗺️ Smart Routing Logic:
- Trucks: Queries OSRM (Open Source Routing Machine) for real road distances.
- Planes/Ships: Calculates Geodesic (Great Circle) distance for air/sea routes.
- 📊 Live Visualization: Displays the shipment route on an interactive map.
- 🌱 ISO-Compliant Math: Calculates CO2e emissions using mode-specific emission factors.
- Frontend: Streamlit (Python)
- Backend: FastAPI
- AI Model: Google Gemini 1.5 Flash
- Mapping: Geopy, OSRM API, Pandas
- Deployment: Localhost
-
Clone the Repository
git clone [https://github.com/onkaryadav2541/EcoChain_AI.git](https://github.com/onkaryadav2541/EcoChain_AI.git) cd EcoChain_AI -
Install Dependencies
pip install -r requirements.txt
-
Run the Backend (Terminal 1)
uvicorn main:app --reload
-
Run the Frontend (Terminal 2)
streamlit run app.py
- Upload: User drags & drops a logistics invoice (PDF).
- Analyze: AI extracts the city names and weight.
- Route: The app calculates the exact km (Road vs Air) and shows it on a map.
- Result: The precise Carbon Footprint (kg CO2) is displayed.
Author: Onkar | Built during the 10-Day AI Engineer Challenge