# 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 …