File size: 548 Bytes
ec765f7
87b98d4
e93edee
ec765f7
ca823ee
e93edee
87b98d4
e93edee
87b98d4
 
 
 
 
 
beae3a1
87b98d4
ec765f7
e93edee
 
 
 
 
 
 
 
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
import gradio as gr
import json
from utils.utils import process_geojson


# Interface
with gr.Blocks() as ui:

    with gr.Row():
        with gr.Column():
            file_input = gr.File(file_types=[".geojson"])
            submit_btn = gr.Button("Submit")
        with gr.Column():
            output = gr.JSON()
    
    submit_btn.click(process_geojson, file_input, output)

# Launch app
if __name__ == "__main__":
    ui.launch(
        server_name="0.0.0.0",
        server_port=7860, 
        #mcp_server=True,
        show_error=True
    )