3morrrrr commited on
Commit
e387e2b
Β·
verified Β·
1 Parent(s): ccb015b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -1,4 +1,20 @@
 
 
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  import pandas as pd
3
  from fuzzywuzzy import process, fuzz
4
  import tempfile
@@ -147,4 +163,4 @@ with gr.Blocks(title="Schedule Processor") as demo:
147
  )
148
 
149
  if __name__ == "__main__":
150
- demo.launch()
 
1
+ # app.py
2
+
3
  import gradio as gr
4
+
5
+ # ─── monkey‑patch gradio_client.utils.get_type to handle boolean schemas ───
6
+ import gradio_client.utils as client_utils
7
+
8
+ _orig_get_type = client_utils.get_type
9
+ def safe_get_type(schema, *args, **kwargs):
10
+ # if a JSON‑schema node is literally True/False, just treat it as a generic dict
11
+ if isinstance(schema, bool):
12
+ return "dict"
13
+ return _orig_get_type(schema, *args, **kwargs)
14
+
15
+ client_utils.get_type = safe_get_type
16
+ # ─────────────────────────────────────────────────────────────────────────────
17
+
18
  import pandas as pd
19
  from fuzzywuzzy import process, fuzz
20
  import tempfile
 
163
  )
164
 
165
  if __name__ == "__main__":
166
+ demo.launch()