-
Notifications
You must be signed in to change notification settings - Fork 0
illuminzcode/acTemperature-ai
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Repository files navigation
# π§ Smart AC Temperature Predictor (AI-Driven)
This project uses machine learning to recommend optimal AC temperature settings based on:
- Number of people in the room
- Number of AC units
- Total power of AC units
It provides a FastAPI interface to:
- Train the model with new data
- Analyze crowd data and return recommended AC temperature
---
## π Features
- β
FastAPI endpoints for training and prediction
- β
Uses `SGDRegressor` for incremental learning (`partial_fit`)
- β
Saves and loads model using `joblib`
- β
Input validation and safe defaults
- β
Real-time model improvement with feedback loop
---
## π§© Example Use Case
A smart building system tracks:
- Room occupancy
- AC specs (count and total wattage)
And automatically adjusts the AC temperature setting via this API.
---
## π¦ Tech Stack
- Python 3.10+
- FastAPI
- scikit-learn (SGDRegressor)
- joblib
- Uvicorn
---
## π Project Structure
acTemperature/
βββ ac_temp_ai.py # Main FastAPI app
βββ model.joblib # Trained ML model
βββ requirements.txt # Python dependencies
βββ README.md # This file
/analyze β Predict recommended temperature
POST /analyze
{
"num_people": 15,
"num_ac": 3,
"total_ac_power": 4500
}
Response:
{
"recommended_temp_setting": 21.5,
"ac_suggestion": "AC setup is sufficient."
}
π οΈ Setup Instructions
# 1. Clone the repo
git clone https://github.com/illuminzcode/acTemperature-ai.git
cd acTemperature-ai
# 2. Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run the server
uvicorn ac_temp_ai:app --reloadAbout
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published