AI-plant-vision / README.md
fadiyahalanazi's picture
Update README.md
6dda06b verified

A newer version of the Gradio SDK is available: 5.19.0

Upgrade
metadata
title: AI Plant Vision
emoji: πŸ†
colorFrom: yellow
colorTo: purple
sdk: gradio
sdk_version: 5.17.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: ' Plant Classifier AI - Integrated with Plant Info API '

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

AI Plant Vision

🌿 Overview

AI Plant Vision is a Gradio-based web application that allows users to identify plants from images and retrieve detailed information about them in either English or Arabic. The system leverages a zero-shot image classification model and a text generation model to provide accurate plant identification and rich informational content.

πŸš€ Features

  • Upload an image to identify a plant.
  • Supports multiple plant types such as Lavender, Aloe Vera, Mint, and Orchids.
  • Provides detailed plant information, including scientific name, growing conditions, common uses, and care tips.
  • Supports English and Arabic languages.
  • Uses advanced AI models for classification and text generation.
  • Optimized for fast GPU-based inference to enhance performance.
  • Modular pipeline for easy scalability and future model improvements.

πŸ› οΈ Installation & Setup

Prerequisites

Ensure you have Python installed on your system (>=3.8).

Step 1: Clone the Repository

git clone https://huggingface.co/spaces/fadiyahalanazi/AI-plant-vision

Step 2: Create a Virtual Environment (Optional but Recommended)

python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

Step 3: Install Dependencies

The script automatically installs required packages. However, you can also install them manually:

pip install -r requirements.txt

Step 4: Run the Application

python app.py

πŸ“œ How It Works

  1. Upload a plant image.
  2. Choose your preferred language (English/Arabic).
  3. Click the "Identify & Get Info" button.
  4. The app classifies the plant and fetches detailed information.

πŸ“Œ Technologies Used

  • Python - Primary language for implementation.
  • Transformers - Utilized for image classification and text generation.
  • Gradio - Provides an interactive user interface.
  • Torch - Facilitates deep learning model computations.
  • Hugging Face Spaces - Used for deployment with GPU acceleration.

πŸ–ΌοΈ User Interface

The app features a clean and responsive UI with:

  • Custom styling.
  • Intuitive controls for image input and language selection.
  • Instant plant identification and information retrieval.

πŸ”₯ Model Details

  • Image Classification Model: umutbozdag/plant-identity
  • Text Generation Models:
    • English: microsoft/Phi-3-mini-4k-instruct
    • Arabic: ALLaM-AI/ALLaM-7B-Instruct-preview