File size: 1,208 Bytes
9f7a6d7
 
 
 
 
 
 
d53a51c
9f7a6d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d53a51c
 
 
9f7a6d7
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
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