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.
- 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.
- Python 3.7+
- Pip (Python package installer)
- Git (for cloning the repository)
- PyTorch
-
Clone the repository:
git clone https://github.com/FaisalAhmedBijoy/Chat-Bot-using-LLM-with-Gradio
-
Install the dependencies:
pip install -r requirements.txt
-
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
-
Run the Flask application:
python app.py
-
Open your browser and go to:
http://127.0.0.1:5000
agri-chatbot/
│
├── static/
│ ├── audio/
│ ├── images/
│
├── templates/
│ └── index.html
│
├── .env
├── app.py
├── download_model.py
├── requirements.txt
└── README.md
- Type your query in the input box and press
Send
. - The bot will respond with a text message and an audio message.
- 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.