github-actions[bot] commited on
Commit
5fba806
·
1 Parent(s): d5f26e7

Deploy from GitHub - 2026-01-21 06:55:45

Browse files
Files changed (2) hide show
  1. app.py +12 -0
  2. requirements.txt +2 -1
app.py CHANGED
@@ -29,6 +29,18 @@ from collections import deque
29
  import tempfile
30
  import json
31
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  # Try to import plotly for charts
33
  try:
34
  import plotly.graph_objects as go
 
29
  import tempfile
30
  import json
31
 
32
+ # Workaround for gradio_client bug with dict schemas
33
+ try:
34
+ from gradio_client import client_utils
35
+ original_get_type = client_utils.get_type
36
+ def patched_get_type(schema):
37
+ if isinstance(schema, bool):
38
+ return "bool" if schema else "Any"
39
+ return original_get_type(schema)
40
+ client_utils.get_type = patched_get_type
41
+ except Exception:
42
+ pass # Skip patching if structure is different
43
+
44
  # Try to import plotly for charts
45
  try:
46
  import plotly.graph_objects as go
requirements.txt CHANGED
@@ -2,11 +2,12 @@
2
  torch>=2.0.0
3
  torchvision>=0.15.0
4
  gradio>=5.16.0
5
- gradio_client>=1.8.0
6
  huggingface_hub>=0.23.0
7
  spaces>=0.30.0
8
  Pillow>=9.5.0
9
  numpy>=1.24.0
 
10
 
11
  # For CUDA kernel compilation
12
  ninja>=1.10.0
 
2
  torch>=2.0.0
3
  torchvision>=0.15.0
4
  gradio>=5.16.0
5
+ gradio_client>=1.9.0
6
  huggingface_hub>=0.23.0
7
  spaces>=0.30.0
8
  Pillow>=9.5.0
9
  numpy>=1.24.0
10
+ pydantic>=2.0.0
11
 
12
  # For CUDA kernel compilation
13
  ninja>=1.10.0