Spaces:
Sleeping
Sleeping
Commit
·
5949542
1
Parent(s):
572abf8
Initial commit
Browse files- Dockerfile +1 -1
- agents/__pycache__/agents.cpython-312.pyc +0 -0
- anticipation/__pycache__/__init__.cpython-312.pyc +0 -0
- anticipation/__pycache__/config.cpython-312.pyc +0 -0
- anticipation/__pycache__/ops.cpython-312.pyc +0 -0
- anticipation/__pycache__/sample.cpython-312.pyc +0 -0
- anticipation/__pycache__/vocab.cpython-312.pyc +0 -0
- api.py +1 -1
Dockerfile
CHANGED
@@ -5,7 +5,7 @@ RUN useradd -m -u 1000 user
|
|
5 |
|
6 |
# Set Hugging Face cache to user's writable directory
|
7 |
ENV HF_HOME=/home/user/.cache/huggingface
|
8 |
-
ENV TRANSFORMERS_CACHE=/
|
9 |
|
10 |
# Create cache directory with proper permissions
|
11 |
RUN mkdir -p ${HF_HOME} && chown -R user:user /home/user
|
|
|
5 |
|
6 |
# Set Hugging Face cache to user's writable directory
|
7 |
ENV HF_HOME=/home/user/.cache/huggingface
|
8 |
+
ENV TRANSFORMERS_CACHE=/data/huggingface_cache
|
9 |
|
10 |
# Create cache directory with proper permissions
|
11 |
RUN mkdir -p ${HF_HOME} && chown -R user:user /home/user
|
agents/__pycache__/agents.cpython-312.pyc
ADDED
Binary file (16 kB). View file
|
|
anticipation/__pycache__/__init__.cpython-312.pyc
ADDED
Binary file (590 Bytes). View file
|
|
anticipation/__pycache__/config.cpython-312.pyc
ADDED
Binary file (1.91 kB). View file
|
|
anticipation/__pycache__/ops.cpython-312.pyc
ADDED
Binary file (10.4 kB). View file
|
|
anticipation/__pycache__/sample.cpython-312.pyc
ADDED
Binary file (11.5 kB). View file
|
|
anticipation/__pycache__/vocab.cpython-312.pyc
ADDED
Binary file (2.3 kB). View file
|
|
api.py
CHANGED
@@ -54,7 +54,7 @@ def load_model():
|
|
54 |
with MODEL_LOCK:
|
55 |
if MODEL is None:
|
56 |
print("⏳ Loading music generation model...")
|
57 |
-
MODEL = AutoModelForCausalLM.from_pretrained('stanford-crfm/music-small-800k',local_files_only=
|
58 |
# Add .cuda() here if using GPU
|
59 |
print("✅ Model loaded successfully!")
|
60 |
return MODEL
|
|
|
54 |
with MODEL_LOCK:
|
55 |
if MODEL is None:
|
56 |
print("⏳ Loading music generation model...")
|
57 |
+
MODEL = AutoModelForCausalLM.from_pretrained('stanford-crfm/music-small-800k',local_files_only=False, force_download=False) # Prevent re-downloads
|
58 |
# Add .cuda() here if using GPU
|
59 |
print("✅ Model loaded successfully!")
|
60 |
return MODEL
|