CoolFace
Apppublic

Goutham003/Knowledge_Graph_of_Agro-Events

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
App README

🌱 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

text
.
β”œβ”€β”€ 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.