Skip to content

FaisalAhmedBijoy/Chat-Bot-using-LLM-with-Gradio

Repository files navigation

Agri Chatbot: Chat-Bot-using-LLM

This project is an agriculture chatbot designed to assist farmers with their queries using a large language model. The chatbot is built with Flask for the backend and uses a pre-trained model from Hugging Face for generating responses.

Features

  • Chat Interface: Interact with the chatbot through a user-friendly chat interface.
  • Text-to-Speech: Converts the chatbot's responses to audio.
  • Responsive Design: Ensures the interface looks good on all devices using Bootstrap.

Getting Started

Prerequisites

  • Python 3.7+
  • Pip (Python package installer)
  • Git (for cloning the repository)
  • PyTorch

Installation

  1. Clone the repository:

    git clone https://github.com/FaisalAhmedBijoy/Chat-Bot-using-LLM-with-Gradio
  2. Install the dependencies:

    pip install -r requirements.txt
  3. Download the model:

    Download the Qwen/Qwen2-7B-Instruct model from Hugging Face and place it in a directory (e.g., models).

    python download_model.py

Running the Application

  1. Run the Flask application:

    python app.py
  2. Open your browser and go to:

    http://127.0.0.1:5000
    

Project Structure

agri-chatbot/
│
├── static/
│   ├── audio/
│   ├── images/
│
├── templates/
│   └── index.html
│
├── .env
├── app.py
├── download_model.py
├── requirements.txt
└── README.md

Demo

Demo

Usage

  1. Type your query in the input box and press Send.
  2. The bot will respond with a text message and an audio message.

Acknowledgments

  • The chatbot uses the Qwen2-7B-Instruct model from Hugging Face.
  • Flask is used for the web framework.
  • Bootstrap is used for styling the web interface.

Contributors