Plant-info / README.md
fadiyahalanazi's picture
Update README.md
ed43ac4 verified

A newer version of the Gradio SDK is available: 5.19.0

Upgrade
metadata
title: Plant Info
emoji: ๐Ÿข
colorFrom: green
colorTo: pink
sdk: gradio
sdk_version: 5.18.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: 'Plant information '

๐ŸŒฟ AI Plant Guide - English & Arabic

Overview

AI Plant Guide is a user-friendly Gradio-based application that provides detailed plant information in both English and Arabic. By entering a plant name and selecting a language, users can access insights on scientific names, growing conditions, common uses, and care tips.

Project Objectives

  • Provide an AI-powered plant guide with bilingual support.
  • Ensure user-friendly interaction through a web-based interface.
  • Leverage state-of-the-art NLP models for accurate and informative responses.
  • Offer quick and efficient responses using GPU acceleration.

Implemented Pipelines

  1. User Input Handling:
    • The user enters a plant name and selects a language.
  2. Model Selection:
    • Based on the chosen language, the appropriate transformer model is loaded:
      • Microsoft Phi-3-mini-4k-instruct for English
      • ALLaM-7B-Instruct-preview for Arabic
  3. Text Generation Pipeline:
    • The selected model generates plant details, including:
      • Scientific name
      • Growing conditions
      • Common uses
      • Care tips
  4. Output Display:
    • The generated information is displayed in a user-friendly interface.

Instructions for Using the Interface

  1. Open the Gradio UI in your browser.
  2. Select a language (English/Arabic).
  3. Enter a plant name (e.g., Lavender, Aloe Vera).
  4. Click "๐Ÿ” Get Plant Info" to generate information.
  5. View the plant details in the output box.

Justification for Model and Pipeline Choices

  • Hugging Face Transformers: Offers pre-trained state-of-the-art language models optimized for text generation.
  • Gradio: Provides an easy-to-use web interface without the need for extensive frontend development.
  • PyTorch: Ensures efficient model inference and flexibility for future enhancements.
  • GPU Acceleration: Speeds up response times, improving user experience.
  • Pipeline-Based Design: Ensures modularity and scalability for future improvements.

Bilingual Implementation

  • The project supports English and Arabic via two specialized transformer models.
  • The UI allows users to choose their preferred language.
  • The prompt structure is adapted for each language to ensure high-quality responses.

Technologies Used

  • Gradio for UI development
  • Transformers (Hugging Face) for text generation
  • PyTorch for model inference
  • Microsoft Phi-3-mini-4k-instruct (English) and ALLaM-7B-Instruct-preview (Arabic) models
  • Spaces GPU Acceleration

Installation

Prerequisites

Ensure you have Python installed (>=3.8) and required dependencies.

Steps

  1. Clone the repository:
    
    

git clone https://huggingface.co/spaces/fadiyahalanazi/Plant-info

2. **Create a virtual environment (optional but recommended)**:
```bash
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  1. Install dependencies:
    pip install -r requirements.txt
    
  2. Run the application:
    python app.py
    

Deployment

This project is deployed on Hugging Face Spaces. You can access it directly here.

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