Raghu commited on
Commit
ae56e5e
·
1 Parent(s): 97d71ca

Restore Gradio api_info; keep bool-safe schema guard

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -23,7 +23,6 @@ warnings.filterwarnings('ignore')
23
  # ---------------------------------------------------------------------------
24
  # Work around Gradio json_schema traversal crash:
25
  # - guard bool schema entries
26
- # - short-circuit API info generation
27
  # ---------------------------------------------------------------------------
28
  import gradio_client.utils as grc_utils
29
  _orig_get_type = grc_utils.get_type
@@ -45,10 +44,6 @@ def _safe_json_schema_to_python_type(schema, defs=None):
45
  grc_utils.get_type = _safe_get_type
46
  grc_utils.json_schema_to_python_type = _safe_json_schema_to_python_type
47
 
48
- # Avoid API schema generation entirely to prevent upstream traversal
49
- gr_routes.api_info = lambda serialize=True: {}
50
- gr.Blocks.get_api_info = lambda self: {}
51
-
52
  # ============================================================================
53
  # Configuration
54
  # ============================================================================
 
23
  # ---------------------------------------------------------------------------
24
  # Work around Gradio json_schema traversal crash:
25
  # - guard bool schema entries
 
26
  # ---------------------------------------------------------------------------
27
  import gradio_client.utils as grc_utils
28
  _orig_get_type = grc_utils.get_type
 
44
  grc_utils.get_type = _safe_get_type
45
  grc_utils.json_schema_to_python_type = _safe_json_schema_to_python_type
46
 
 
 
 
 
47
  # ============================================================================
48
  # Configuration
49
  # ============================================================================