YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

---# AgriGPT: Agricultural Expert Chatbot

Overview

AgriGPT is an AI-powered chatbot designed to provide instant agricultural advice to farmers. It addresses common challenges such as pest control, crop management, weather forecasting, and market price updates. The goal is to improve productivity, reduce costs, and empower smallholder farmers with actionable insights.

Key Features

  • AI-Powered Chatbot: Understands and responds to user queries about crop cultivation, pest management, weather patterns, and market prices.
  • Agronomist Consultation: Escalate complex queries to certified agronomists for expert advice.
  • Knowledge Base: Searchable database of frequently asked questions (FAQs) and answers curated from trusted sources.
  • Crop Health Monitoring: Analyze photos of crops to diagnose issues like nutrient deficiencies, pests, or diseases.
  • Market Price Updates: Fetch real-time data on commodity prices from local markets or exchanges.
  • Notifications & Alerts: Receive alerts for upcoming weather changes, pest outbreaks, or new farming techniques.

Training Details

  • NLP Model: Trained using the Hugging Face Transformers library on a dataset of agricultural FAQs and research papers.
  • Computer Vision Model: Trained using TensorFlow/Keras on a dataset of crop images labeled with common diseases and deficiencies.
  • Evaluation Metrics:
    • NLP Model Accuracy: 92%
    • Crop Health Diagnosis Accuracy: 88%

Usage Instructions

Prerequisites

Install the required libraries:

pip install transformers torch tensorflow opencv-python flask

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("agri_expert/agrigpt")
model = AutoModelForSeq2SeqLM.from_pretrained("agri_expert/agrigpt")

def get_response(query):
    inputs = tokenizer(query, return_tensors="pt")
    outputs = model.generate(**inputs)
    response = tokenizer.decode(outputs[0], skip_special_tokens=True)
    return response

    import tensorflow as tf

# Load the model
model = tf.keras.models.load_model("crop_monitoring/model.h5")

# Predict crop health
def predict_crop_health(image_path):
    img = tf.keras.preprocessing.image.load_img(image_path, target_size=(224, 224))
    img_array = tf.keras.preprocessing.image.img_to_array(img)
    img_array = tf.expand_dims(img_array, 0) / 255.0
    predictions = model.predict(img_array)
    label = labels[np.argmax(predictions)]
    return label

    Requirements
Python 3.8+
Libraries: transformers, torch, tensorflow, opencv-python, flask
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support