Spaces:
Running on Zero
Running on Zero
Commit ·
ac5149f
1
Parent(s): 094e201
Use writable Transformers module cache
Browse files
app.py
CHANGED
|
@@ -21,6 +21,9 @@ from typing import Any
|
|
| 21 |
|
| 22 |
os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True")
|
| 23 |
os.environ.setdefault("ONLINE_CODEC_CACHE_DIR", "/tmp/replayforge-codec-cache")
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
import cv2
|
| 26 |
import gradio as gr
|
|
|
|
| 21 |
|
| 22 |
os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True")
|
| 23 |
os.environ.setdefault("ONLINE_CODEC_CACHE_DIR", "/tmp/replayforge-codec-cache")
|
| 24 |
+
os.environ.setdefault("HF_MODULES_CACHE", "/tmp/replayforge-hf-modules")
|
| 25 |
+
|
| 26 |
+
Path(os.environ["HF_MODULES_CACHE"]).mkdir(parents=True, exist_ok=True)
|
| 27 |
|
| 28 |
import cv2
|
| 29 |
import gradio as gr
|