yinuozhang commited on
Commit
7fb286d
·
1 Parent(s): f271b15
Files changed (2) hide show
  1. app.py +11 -0
  2. requirements.txt +2 -2
app.py CHANGED
@@ -1,4 +1,15 @@
1
  import os
 
 
 
 
 
 
 
 
 
 
 
2
  import gradio as gr
3
  import gradio.blocks
4
  import re
 
1
  import os
2
+ import gradio_client.utils as client_utils
3
+
4
+ _original = client_utils._json_schema_to_python_type
5
+ def _safe_json_schema_to_python_type(schema, defs=None):
6
+ if isinstance(schema, bool):
7
+ return "Any"
8
+ return _original(schema, defs)
9
+
10
+ # Override both entry points
11
+ client_utils._json_schema_to_python_type = _safe_json_schema_to_python_type
12
+ client_utils.json_schema_to_python_type = _safe_json_schema_to_python_type
13
  import gradio as gr
14
  import gradio.blocks
15
  import re
requirements.txt CHANGED
@@ -1,8 +1,8 @@
 
1
  pandas==2.2.0
2
  rdkit==2023.9.1
3
  Pillow==10.0.0
4
  matplotlib==3.7.1
5
  numpy>=1.24.3
6
- gradio==3.53.1
7
- gradio-client==0.3.0
8
  fastapi
 
1
+ gradio==5.20.1
2
  pandas==2.2.0
3
  rdkit==2023.9.1
4
  Pillow==10.0.0
5
  matplotlib==3.7.1
6
  numpy>=1.24.3
7
+ gradio-client==1.7.2
 
8
  fastapi