Spaces:
Running
on
Zero
Running
on
Zero
A newer version of the Gradio SDK is available:
5.19.0
metadata
title: PlantInfo
emoji: 🦀
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 5.17.1
app_file: app.py
pinned: false
license: apache-2.0
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
🌿 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
- User Input Handling:
- The user enters a plant name and selects a language.
- 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
- Based on the chosen language, the appropriate transformer model is loaded:
- Text Generation Pipeline:
- The selected model generates plant details, including:
- Scientific name
- Growing conditions
- Common uses
- Care tips
- The selected model generates plant details, including:
- Output Display:
- The generated information is displayed in a user-friendly interface.
Instructions for Using the Interface
- Open the Gradio UI in your browser.
- Select a language (English/Arabic).
- Enter a plant name (e.g., Lavender, Aloe Vera).
- Click "🔍 Get Plant Info" to generate information.
- 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
- Clone the repository:
git clone https://huggingface.co/spaces/NoufSaleh46/PlantInfo1 cd PlantInfo1
- Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
Deployment
This project is deployed on Hugging Face Spaces. You can access it directly here.