Spaces:
Running
Running
File size: 603 Bytes
ec765f7 edb4551 ec765f7 ca823ee edb4551 e93edee edb4551 7121e85 edb4551 7121e85 edb4551 3563d85 a576faa edb4551 ec765f7 edb4551 |
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 |
import gradio as gr
import json
from utils.main_processor import get_statistics
# Interface
with gr.Blocks() as ui:
with gr.Row():
file_input = gr.File(file_types=[".geojson"])
with gr.Row():
with gr.Column():
submit_btn = gr.Button("Submit")
with gr.Row():
output = gr.Dataframe()
# Submit button action
submit_btn.click(get_statistics,
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
) |