ghitaben commited on
Commit
b1f80be
·
1 Parent(s): ac6f3d5

Fix gradio version.

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +3 -3
  3. pyproject.toml +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: ⚕️
4
  colorFrom: blue
5
  colorTo: indigo
6
  sdk: gradio
7
- sdk_version: "5.0.0"
8
  python_version: "3.11"
9
  pinned: true
10
  license: apache-2.0
 
4
  colorFrom: blue
5
  colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: "5.25.0"
8
  python_version: "3.11"
9
  pinned: true
10
  license: apache-2.0
app.py CHANGED
@@ -45,10 +45,10 @@ if os.environ.get("SPACE_ID") and not _DB_PATH.exists():
45
  import gradio as gr
46
  import pandas as pd
47
 
48
- # ── Gradio 5.0.0 boolean-schema patch ───────────────────────────────────────
49
- # gradio 5.0.0 walks JSON Schemas and does `if "const" in schema:` without
50
  # guarding against boolean schemas (valid in JSON Schema spec but not a dict).
51
- # Patch every reachable schema-walking helper to skip non-dict schemas.
52
  try:
53
  import gradio.utils as _gr_utils
54
  _orig_get_type = getattr(_gr_utils, "get_type", None)
 
45
  import gradio as gr
46
  import pandas as pd
47
 
48
+ # ── Gradio boolean-schema safety patch ───────────────────────────────────────
49
+ # Gradio <5.7 walks JSON Schemas and does `if "const" in schema:` without
50
  # guarding against boolean schemas (valid in JSON Schema spec but not a dict).
51
+ # sdk_version is now >=5.25.0 (bug fixed upstream) but keep this as a guard.
52
  try:
53
  import gradio.utils as _gr_utils
54
  _orig_get_type = getattr(_gr_utils, "get_type", None)
pyproject.toml CHANGED
@@ -25,6 +25,6 @@ dependencies = [
25
  "jq>=1.11.0",
26
  "pandas>=2.0.0",
27
  "huggingface-hub",
28
- "gradio>=6.6.0",
29
  "spaces>=0.47.0",
30
  ]
 
25
  "jq>=1.11.0",
26
  "pandas>=2.0.0",
27
  "huggingface-hub",
28
+ "gradio>=5.25.0",
29
  "spaces>=0.47.0",
30
  ]