feylur commited on
Commit
ecba289
·
verified ·
1 Parent(s): baf8a3a

Update patch_gradio.py

Browse files
Files changed (1) hide show
  1. patch_gradio.py +4 -4
patch_gradio.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio_client.utils as utils
2
 
3
- original_get_type = utils.get_type
4
 
5
- def patched_get_type(schema):
6
  if not isinstance(schema, dict):
7
  return "any"
8
- return original_get_type(schema)
9
 
10
- utils.get_type = patched_get_type
 
1
  import gradio_client.utils as utils
2
 
3
+ original_json_schema_to_python_type = utils._json_schema_to_python_type
4
 
5
+ def patched_json_schema_to_python_type(schema, defs=None):
6
  if not isinstance(schema, dict):
7
  return "any"
8
+ return original_json_schema_to_python_type(schema, defs)
9
 
10
+ utils._json_schema_to_python_type = patched_json_schema_to_python_type