Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
info="The query to search for in the vector database"
|
15 |
-
)]
|
16 |
)
|
17 |
|
18 |
# Launch with MCP server enabled
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def handle_geojson_upload(file):
|
4 |
+
if file is None:
|
5 |
+
return "No file uploaded"
|
6 |
+
content = file.read()
|
7 |
+
return f"Uploaded file with size: {len(content)} bytes"
|
8 |
+
|
9 |
+
iface = gr.Interface(
|
10 |
+
fn=handle_geojson_upload,
|
11 |
+
inputs=gr.File(file_types=[".geojson"]), # restrict to geojson
|
12 |
+
outputs="text",
|
13 |
+
title="GeoJSON Upload Example"
|
|
|
|
|
14 |
)
|
15 |
|
16 |
# Launch with MCP server enabled
|