someone-in-the-world Claude Sonnet 4.6 commited on
Commit
56450ae
·
1 Parent(s): b2a7efc

Redirect HF model cache to persistent storage on /data/hf_cache

Browse files

Avoids re-downloading ~20GB of model weights on every cold start.

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

Files changed (1) hide show
  1. app.py +2 -0
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