Skip to content

Ecometrics is an integrated dashboard platform that ingests industrial and operational data, applies a trained Pickle model to predict carbon emissions, and delivers AI‑powered recommendations to help organizations reduce their environmental footprint.

Notifications You must be signed in to change notification settings

Stu-ops/Ecometrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecometrics Net Footprint Dashboard

Repo Size Languages License: MIT

Table of Contents

Sections

Project Overview

apna‑nfd ingests industrial metrics, uses a PyTorch model to predict carbon footprints, and delivers sustainability recommendations via an AI chatbot. It’s split into backend, frontend, and an AI_Part module for recommendation logic.

Repository Structure


├── AI_Part/                # Chatbot & recommendation engine  
├── backend/                # FastAPI service, PyTorch model, templates  
│   ├── app.py  
│   ├── asgi.py  
│   ├── model/carbon_model.pth  
│   ├── data/sample_input.csv  
│   ├── data/sample_output.csv  
│   ├── static/css/style.css  
│   └── templates/index.html  
├── frontend/               # React/TypeScript SPA  
│   ├── package.json  
│   ├── public/index.html  
│   └── src/  
├── sample_data.csv         # Combined sample data  
└── index.html              # ← this file  
      

Tech Stack

  • Backend: FastAPI (ASGI) , Uvicorn, Pydantic
  • Model: PyTorch .pth serialization
  • Chatbot: Groq AI integration
  • Frontend: React, TypeScript, Vite
  • Containerization: Docker & Docker Compose
  • Docs: Swagger UI & ReDoc (OpenAPI)

Getting Started

Backend


cd backend
pip install -r requirements.txt
uvicorn asgi:asgi_app --reload --host 0.0.0.0 --port 8000
      

Frontend


cd frontend
npm install
npm run dev    # http://localhost:3000
      

Docker & Docker Compose


# docker-compose.yml
version: '3.8'
services:
  backend:
    build: ./backend
    ports: ["8000:8000"]
  frontend:
    build: ./frontend
    ports: ["3000:3000"]

launch all

docker-compose up --build

Usage & API

API Endpoints

RouteMethodDescription
/GETDashboard HTML
/predictPOSTIndustrial metrics → carbon prediction
/chatPOSTAI sustainability advice

Interactive Docs

Swagger UI: /docs
ReDoc: /redoc

AI_Part Module


AI_Part/
├── chatbot.py       # Message handling
├── recommendations/ # Prompt templates & logic
└── utils.py
      

Run CLI tests: python AI_Part/chatbot.py

Sample Data

  • backend/data/sample_input.csv
  • backend/data/sample_output.csv
  • sample_data.csv

Contributing

  1. Fork & create branch (feature/xyz)
  2. Commit with Conventional Commits
  3. Open a Pull Request against main

License

MIT License. See LICENSE for details.

About

Ecometrics is an integrated dashboard platform that ingests industrial and operational data, applies a trained Pickle model to predict carbon emissions, and delivers AI‑powered recommendations to help organizations reduce their environmental footprint.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published