KhetFlix is a Flask-based agricultural assistant for Indian farmers. It provides AI-powered crop guidance, voice chat, progressive feedback, video-frame analysis, government-scheme discovery, and an interactive India farm map.
- Text and voice farming assistant powered by OpenAI
- Crop and video-frame analysis
- Progressive farming feedback and downloadable PDF reports
- Government scheme finder
- India farm map and agricultural data endpoints
- Python and Flask
- OpenAI API
- HTML, CSS, and JavaScript templates
- ReportLab for PDF generation
-
Install Python 3.10 or newer.
-
Clone the repository and enter the project directory.
-
Create and activate a virtual environment (recommended).
-
Install dependencies:
python -m pip install -r requirements.txt
-
Create a
.envfile in the project root:OPENAI_API_KEY=your_openai_api_key
-
Start the development server:
python app.py
-
Visit
http://localhost:5000.
This repository includes render.yaml, so it can be deployed as a Render Blueprint.
- Push this repository to GitHub.
- In Render, select New + → Blueprint and connect the repository.
- Render detects
render.yamland creates thekhetflixweb service. - Add the
OPENAI_API_KEYenvironment variable in the Render service settings. - Deploy. Render will build with
pip install -r requirements.txtand start withgunicorn app:app.
| Variable | Required | Purpose |
|---|---|---|
OPENAI_API_KEY |
Yes | Enables the OpenAI-powered assistant and analysis features. |
Never commit .env or an API key. The supplied .gitignore excludes both local secrets and generated files.