Spaces:
Sleeping
Sleeping
Commit ·
56450ae
1
Parent(s): b2a7efc
Redirect HF model cache to persistent storage on /data/hf_cache
Browse filesAvoids re-downloading ~20GB of model weights on every cold start.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
import os
|
| 2 |
import gc
|
| 3 |
import threading
|
|
|
|
|
|
|
| 4 |
import gradio as gr
|
| 5 |
import numpy as np
|
| 6 |
import spaces
|
|
|
|
| 1 |
import os
|
| 2 |
import gc
|
| 3 |
import threading
|
| 4 |
+
|
| 5 |
+
os.environ.setdefault("HF_HOME", "/data/hf_cache")
|
| 6 |
import gradio as gr
|
| 7 |
import numpy as np
|
| 8 |
import spaces
|