Spaces:
Sleeping
Sleeping
fix 9
Browse files
app.py
CHANGED
|
@@ -5,6 +5,25 @@ Gradio Web Interface for City Map Poster Generator
|
|
| 5 |
|
| 6 |
import os
|
| 7 |
import json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
import gradio as gr
|
| 9 |
|
| 10 |
# Import from the main module
|
|
|
|
| 5 |
|
| 6 |
import os
|
| 7 |
import json
|
| 8 |
+
|
| 9 |
+
# Monkey-patch gradio_client bug before importing gradio
|
| 10 |
+
# Fix for: TypeError: argument of type 'bool' is not iterable
|
| 11 |
+
try:
|
| 12 |
+
import gradio_client.utils as client_utils
|
| 13 |
+
|
| 14 |
+
# Store reference to original function
|
| 15 |
+
_original_get_type = client_utils.get_type
|
| 16 |
+
|
| 17 |
+
def _patched_get_type(schema):
|
| 18 |
+
if schema is True or schema is False:
|
| 19 |
+
return "Any"
|
| 20 |
+
return _original_get_type(schema)
|
| 21 |
+
|
| 22 |
+
# Replace the function in the module
|
| 23 |
+
client_utils.get_type = _patched_get_type
|
| 24 |
+
except Exception as e:
|
| 25 |
+
print(f"Warning: Could not patch gradio_client: {e}")
|
| 26 |
+
|
| 27 |
import gradio as gr
|
| 28 |
|
| 29 |
# Import from the main module
|
uv.lock
CHANGED
|
@@ -714,7 +714,7 @@ requires-dist = [
|
|
| 714 |
{ name = "geographiclib", specifier = "==2.1" },
|
| 715 |
{ name = "geopandas", specifier = "==1.1.2" },
|
| 716 |
{ name = "geopy", specifier = "==2.4.1" },
|
| 717 |
-
{ name = "gradio"
|
| 718 |
{ name = "idna", specifier = "==3.11" },
|
| 719 |
{ name = "kiwisolver", specifier = "==1.4.9" },
|
| 720 |
{ name = "matplotlib", specifier = "==3.10.8" },
|
|
|
|
| 714 |
{ name = "geographiclib", specifier = "==2.1" },
|
| 715 |
{ name = "geopandas", specifier = "==1.1.2" },
|
| 716 |
{ name = "geopy", specifier = "==2.4.1" },
|
| 717 |
+
{ name = "gradio" },
|
| 718 |
{ name = "idna", specifier = "==3.11" },
|
| 719 |
{ name = "kiwisolver", specifier = "==1.4.9" },
|
| 720 |
{ name = "matplotlib", specifier = "==3.10.8" },
|