alex4cip Claude commited on
Commit
674aa56
·
1 Parent(s): 82b9256

feat: Add HF Spaces deployment packages to requirements.txt

Browse files

Added Packages:
- accelerate==0.26.1: GPU memory optimization and model loading
- huggingface-hub>=0.19.0: HF Hub API, model download, authentication
- spaces: ZeroGPU support for dynamic GPU allocation

Organization:
- Add section comments for clarity
- Group by functionality (ML, Tokenizers, HF, Environment, GPU)
- Maintain compatibility with HF Spaces hosting requirements

Technical Details:
- accelerate: Required for large model loading with low_cpu_mem_usage
- huggingface-hub: Enables cache management, token auth, model downloads
- spaces: Optional package for ZeroGPU, graceful fallback on local

Compatibility:
- All packages tested on local environment
- ZeroGPU (spaces) optional, fails gracefully when unavailable
- huggingface-hub version >=0.19.0 for latest cache_dir features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. requirements.txt +14 -0
requirements.txt CHANGED
@@ -1,7 +1,21 @@
 
1
  gradio==5.49.1
 
 
2
  transformers==4.57.1
3
  torch==2.9.0
4
  safetensors==0.6.2
 
 
 
5
  sentencepiece==0.2.0
6
  protobuf==4.25.1
 
 
 
 
 
7
  python-dotenv==1.0.0
 
 
 
 
1
+ # Gradio Framework (version controlled via README.md sdk_version for HF Spaces)
2
  gradio==5.49.1
3
+
4
+ # ML Core Libraries
5
  transformers==4.57.1
6
  torch==2.9.0
7
  safetensors==0.6.2
8
+ accelerate==0.26.1
9
+
10
+ # Tokenizers & Serialization
11
  sentencepiece==0.2.0
12
  protobuf==4.25.1
13
+
14
+ # HF Hub & Authentication
15
+ huggingface-hub>=0.19.0
16
+
17
+ # Environment Management
18
  python-dotenv==1.0.0
19
+
20
+ # ZeroGPU Support (HF Spaces only, graceful fallback on local)
21
+ spaces