AgroSense / src /ui /interface.py
RafaelJaime's picture
Added chatbot with agent for legislation
d53a51c
"""
Main Gradio Interface
=====================
Assembles all tabs into the main application interface.
"""
import gradio as gr
from .tabs import create_leaf_tab, create_farm_tab, create_weather_tab, create_legislation_tab
def create_gradio_interface() -> gr.Blocks:
"""Create the complete Gradio interface with all tabs."""
with gr.Blocks(title="MCP AgroSense") as demo:
# ========== HEADER ==========
gr.Markdown(
"""
# 🌱 MCP AgroSense
### Detect diseases in your crops with AI
"""
)
# ========== TABS ==========
with gr.Tabs():
# Tab 1: Leaf Disease Detection
create_leaf_tab()
# Tab 2: Farm Disease Detection
create_farm_tab()
# Tab 3: Weather Alerts
create_weather_tab()
# Tab 4: EU Agricultural Legislation
create_legislation_tab()
# ========== FOOTER ==========
gr.Markdown(
"""
---
*MCP AgroSense - Hackathon MCP 1st Birthday 2025*
"""
)
return demo