chatfed_whisp / app.py
leavoigt's picture
Update app.py
ca823ee verified
raw
history blame
562 Bytes
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
)