# Medicinal Plant Detection Web App β Setup Guide
This is a Flask-based web application that detects **20 species of medicinal plants** using a deep learning model trained with PyTorch. Users can upload a plant leaf image, and the app will identify the plant species and display detailed information in **English** or **Assamese**.
---
## πΏ Project Features
- Detects 20 medicinal plant species from leaf images
- Displays plant information in English or Assamese
- Supports image upload via web interface
- Redirects to a fallback page for uncertain predictions
---
## π Folder Structure
```
project_root/
βββ app.py # Main Flask application
βββ model.pt # Trained PyTorch model
βββ ass_plant_details/ # Assamese HTML info pages (0.html - 19.html)
βββ classes/ # English HTML info pages (0.html - 19.html + unknown.html)
βββ images/ # Optional images (e.g., icons, UI assets)
βββ templates/
β βββ index.html # Upload form (image + language selector)
βββ uploads/ # Auto-created, stores uploaded images temporarily
```
---
## β
Setup Instructions (Run Locally)
### 1. Extract the Project
Unzip the project folder to a known location on your computer.
---
### 2. Open Terminal and Navigate to the Project
```bash
cd path_to_project/Medicinal\ Plant\ Detction
```
---
### 3. Create and Activate a Python Virtual Environment
```bash
python -m venv venv
```
- **Windows:**
```bash
venv\Scripts\activate
```
- **Linux/macOS:**
```bash
source venv/bin/activate
```
---
### 4. Install Required Dependencies
```bash
pip install flask torch torchvision pillow beautifulsoup4
```
---
### 5. Verify Required Files and Pages
Make sure these exist:
- `model.pt` (your trained model)
- `classes/0.html` to `classes/19.html`
- `ass_plant_details/0.html` to `ass_plant_details/19.html`
- `classes/unknown.html` β shown when model confidence is low
- `templates/index.html` β the upload for β¦