Loading repository data…
Loading repository data…
Kalparatna / repository
AgriGenius is an intelligent chatbot designed to answer agriculture-related questions by fetching content from websites and PDFs, translating text using Google Translate, and leveraging a robust language model. This project uses Python, Flask, RAG, LLM, GENAI, API, LangChain, NLP for the backend, and HTML, CSS, and JavaScript for the frontend.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
AgriGenius is an intelligent chatbot designed to answer agriculture-related questions by fetching content from websites and PDFs, translating text using Google Translate, and leveraging a robust language model. This project uses Python, Flask, RAG, LLM, GENAI, API, LangChain, NLP for the backend, and HTML, CSS, and JavaScript for the frontend.
Clone the repository
git clone https://github.com/yourusername/agrigenius-chatbot.git
cd agrigenius-chatbot
Create a virtual environment and activate it
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required packages
pip install -r requirements.txt
Create a .env file
Create a .env file in the root directory of the project and add your Together API key and Google Translate API key:
API_KEY=your__api_key
GOOGLE_TRANSLATE_API_KEY=your_google_translate_api_key
Run the Flask application
flask run
Access the chatbot
Open your browser and go to http://127.0.0.1:5000 to use the AgriGenius chatbot.
agrigenius-chatbot/
├── app/
│ ├── __init__.py
│ ├── routes.py
│ ├── static/
│ │ ├── css/
│ │ └── js/
│ ├── templates/
│ │ └── index.html
│ └── utils.py
├── .env
├── requirements.txt
├── run.py
└── README.md
app/routes.py: Contains the Flask routes and view functions.app/utils.py: Contains utility functions for fetching content, translation, and query handling.app/templates/index.html: The main HTML file for the chatbot interface..env: Environment variables file for API keys.run.py: The entry point to run the Flask application.Load environment variables
from dotenv import load_dotenv
import os
load_dotenv()
together_api_key = os.getenv('API_KEY')
google_translate_api_key = os.getenv('GOOGLE_TRANSLATE_API_KEY')
Initialize the language model
from some_module import Together # Replace with the actual import for Together
llm = Together(
model="meta-llama/Llama-2-70b-chat-hf",
max_tokens=256,
temperature=0.1,
top_k=1,
together_api_key=api_key
)
For a detailed demonstration of the AgriGenius chatbot, you can watch the project video here.
If you have any questions or feedback, please contact us at [kalparatna223@gmail.com].