feng-x commited on
Commit
e09def3
·
verified ·
1 Parent(s): 8f7637c

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. requirements.txt +10 -5
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: "\U0001F48D"
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.0.0
8
  app_file: app.py
9
  python_version: "3.10"
10
  ---
 
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 4.44.1
8
  app_file: app.py
9
  python_version: "3.10"
10
  ---
requirements.txt CHANGED
@@ -7,13 +7,18 @@ flask>=3.0.0
7
  gunicorn>=21.2.0
8
  openai>=1.0.0
9
  supabase>=2.0.0
10
- # SAM 2.1 via HuggingFace transformers (card segmentation)
 
 
 
 
 
 
11
  torch>=2.4.0
12
  torchvision>=0.19.0
13
- transformers>=4.47.0
 
14
  pillow>=10.0.0
15
  # v5: HF ZeroGPU requires Gradio SDK; `spaces` provides @spaces.GPU (no-op off ZeroGPU).
16
- # Gradio 5+ is required because 4.x imports `HfFolder` from huggingface_hub, which
17
- # was removed in huggingface_hub 1.0 (transformers>=4.47 pulls that new version).
18
- gradio>=5.0.0
19
  spaces>=0.30.0
 
7
  gunicorn>=21.2.0
8
  openai>=1.0.0
9
  supabase>=2.0.0
10
+ # SAM 2.1 via HuggingFace transformers (card segmentation).
11
+ # transformers is pinned to the 4.x track because 5.x requires
12
+ # huggingface_hub>=1.5, which removed `HfFolder` — and Gradio (every
13
+ # version we tested, including 5.0) still imports `HfFolder` in its OAuth
14
+ # module. Pinning transformers<5 keeps huggingface_hub<1.0 and the whole
15
+ # stack loadable. We belt-and-suspenders the constraint on
16
+ # huggingface_hub directly in case a future dep also tries to upgrade it.
17
  torch>=2.4.0
18
  torchvision>=0.19.0
19
+ transformers>=4.47.0,<5.0
20
+ huggingface_hub>=0.26,<1.0
21
  pillow>=10.0.0
22
  # v5: HF ZeroGPU requires Gradio SDK; `spaces` provides @spaces.GPU (no-op off ZeroGPU).
23
+ gradio>=4.44.0,<5.0
 
 
24
  spaces>=0.30.0