CoolFace
Apppublic

VedanshSood/Plant-Recommendation-System

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

๐ŸŒฟ AI-Driven Plant Recommendation System

The AI-Driven Plant Recommendation System uses air quality metrics to recommend plants that can improve indoor air quality. Built using FastAPI and Random Forest Machine Learning, this project combines AI and sustainability to create a greener future.


๐Ÿš€ Features

  • โ€”Personalized Plant Recommendations: Based on pollutants like PM2.5, PM10, NO, NO2, O3, and SO2.
  • โ€”API Endpoint: Seamlessly integrates with other systems.
  • โ€”Scalable and Robust: Handles real-time prediction requests with optimized performance.

๐Ÿ”ง Technologies Used

  • โ€”Python: Core programming language for development.
  • โ€”FastAPI: For building the API.
  • โ€”scikit-learn: To train the Random Forest model.
  • โ€”pandas: For data manipulation.
  • โ€”Postman: For API testing.

๐Ÿ› ๏ธ Setup Instructions

Prerequisites

  • โ€”Python 3.8 or above installed
  • โ€”Required Python libraries: pip install -r requirements.txt

Installation Steps

  1. 1.Clone the repository:
bash
   git clone https://github.com/your-username/plant-recommendation-system.git
   cd plant-recommendation-system
  1. 1.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Train the model (if needed):
bash
   python model1.ipynb
  1. 1.Start the FastAPI server:
bash
   uvicorn main:app --reload
  1. 1.Test the API: Use Postman or any API testing tool. Endpoint: POST http://127.0.0.1:8000/predict

๐Ÿ“ก API Usage

Endpoint

POST /predict

Request Body

json
{
    "PM2.5": 159,
    "PM10": 84,
    "NO": 6.2,
    "NO2": 11.2,
    "O3": 55.6,
    "SO2": 17.3
}

Response

json
{
    "recommended_plants": [
        ["Areca Palm", "Peace Lily", "Spider Plant"]
    ]
}

๐Ÿ“‚ Project Structure

plaintext
โ”œโ”€โ”€ main.py          # FastAPI application
โ”œโ”€โ”€ data.py          # Input data validation using Pydantic
โ”œโ”€โ”€ model1.ipynb     # Model training script
โ”œโ”€โ”€ requirements.txt # Project dependencies
โ”œโ”€โ”€ README.md        # Project documentation

๐Ÿ™Œ Acknowledgments

  • โ€”Thanks to the contributors of scikit-learn and FastAPI for their awesome tools.
  • โ€”Special mention to all who supported this project!