Hfzune commited on
Commit
4e58a85
·
verified ·
1 Parent(s): 1b92415

Update bootstrap.py

Browse files
Files changed (1) hide show
  1. bootstrap.py +4 -3
bootstrap.py CHANGED
@@ -1,16 +1,17 @@
 
1
  """Runtime dependency fixes. Import this FIRST in app.py."""
2
  import subprocess, sys, site
3
  from pathlib import Path
4
 
5
- # 1. Upgrade gradio + huggingface-hub at runtime (build used older versions)
6
  subprocess.run(
7
  [sys.executable, "-m", "pip", "install",
8
  "--no-cache-dir", "--upgrade", "--no-deps",
9
- "gradio==6.30.0", "huggingface-hub"],
10
  check=True,
11
  )
12
 
13
- # 2. Relax transformers' huggingface-hub<1.0 pin so it imports successfully
14
  for _root in (*site.getsitepackages(), site.getusersitepackages()):
15
  _table = Path(_root) / "transformers" / "dependency_versions_table.py"
16
  if _table.exists():
 
1
+ # bootstrap.py
2
  """Runtime dependency fixes. Import this FIRST in app.py."""
3
  import subprocess, sys, site
4
  from pathlib import Path
5
 
6
+ # Upgrade gradio + huggingface-hub at runtime after the build succeeds
7
  subprocess.run(
8
  [sys.executable, "-m", "pip", "install",
9
  "--no-cache-dir", "--upgrade", "--no-deps",
10
+ "gradio", "huggingface-hub"],
11
  check=True,
12
  )
13
 
14
+ # Relax transformers' hard pin on huggingface-hub<1.0
15
  for _root in (*site.getsitepackages(), site.getusersitepackages()):
16
  _table = Path(_root) / "transformers" / "dependency_versions_table.py"
17
  if _table.exists():