Goutham003/Knowledge_Graph_of_Agro-Events
0
π± Feature 6 β Knowledge Graph of Agro-Events
This Space hosts a Flask-based demo that builds a knowledge graph of agro-events.
Given:
- Region
- Main crop
- Graph focus (pest / climate / phenology)
- Optional free-text local events
β¦the backend creates a synthetic event knowledge graph and exposes it through a neon-styled AgroVerse UI.
All data is synthetic stubsβyou can later connect real event streams, agronomy APIs, or graph databases.
π§ Tech Stack
- Python 3.11
- Flask β web server
- Gunicorn β production WSGI server (for Hugging Face Spaces)
- (Optional) graph libs such as networkx / matplotlib (depending on your
requirements.txt) - Bootstrap 5 + custom Neon CSS for the frontend
π Project Structure
.
βββ app.py # Flask entrypoint (exposes create_app())
βββ requirements.txt # Python dependencies
βββ Dockerfile # Hugging Face Space (SDK: docker)
βββ README.md # This file
β
βββ models/
β βββ __init__.py
β βββ config.py # Graph & model config
β βββ data_loader.py # Synthetic data loader
β βββ gnn_model.py # (Stub) graph model
β βββ graph_builder.py # Builds knowledge graph from events
β βββ graph_visualizer.py# Creates graph images
β βββ rl_planner.py # (Stub) RL-style planning interface
β βββ search_index.py # Search / retrieval helpers
β
βββ templates/
β βββ base.html # Layout + navbar + neon theme
β βββ index.html # Input form (centered)
β βββ results.html # Graph view, metrics, etc.
β
βββ static/
βββ css/
β βββ style.css # AgroVerse neon theme for Feature 6
βββ js/
β βββ main.js # Frontend interactivity (optional)
βββ generated/ # Generated graph PNGs, etc.
