import gradio as gr def handle_geojson_upload(file): if file is None: return "No file uploaded" content = file.read() return f"Uploaded file with size: {len(content)} bytes" iface = gr.Interface( fn=handle_geojson_upload, inputs=gr.File(file_types=[".geojson"]), # restrict to geojson outputs="text", title="GeoJSON Upload Example" ) # Launch with MCP server enabled if __name__ == "__main__": ui.launch( server_name="0.0.0.0", server_port=7860, #mcp_server=True, show_error=True )