Spaces:
Running
on
Zero
Running
on
Zero
Rishi Desai
commited on
Commit
·
3019c76
1
Parent(s):
64967ea
reverting to persistent storage
Browse files- demo.py +1 -1
- install.py +0 -5
demo.py
CHANGED
@@ -5,7 +5,7 @@ if "HF_DEMO" in os.environ:
|
|
5 |
# Global variable to track if install() has been run; only for deploying on HF space
|
6 |
INSTALLED = False
|
7 |
if not INSTALLED:
|
8 |
-
install(is_hf_space=True, cache_models=
|
9 |
INSTALLED = True
|
10 |
|
11 |
import gradio as gr
|
|
|
5 |
# Global variable to track if install() has been run; only for deploying on HF space
|
6 |
INSTALLED = False
|
7 |
if not INSTALLED:
|
8 |
+
install(is_hf_space=True, cache_models=True)
|
9 |
INSTALLED = True
|
10 |
|
11 |
import gradio as gr
|
install.py
CHANGED
@@ -215,11 +215,6 @@ def install_hfdemo_dependencies():
|
|
215 |
run_cmd("python -m pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124")
|
216 |
run_cmd("python -m pip install -r requirements.txt")
|
217 |
|
218 |
-
# If we're using persistent storage, change to "/data/huggingface_cache"
|
219 |
-
HF_CACHE = "./huggingface_cache"
|
220 |
-
os.environ['HF_HOME'] = HF_CACHE
|
221 |
-
os.makedirs(HF_CACHE, exist_ok=True)
|
222 |
-
|
223 |
|
224 |
def install(is_hf_space=False, cache_models=True):
|
225 |
install_lfs_files()
|
|
|
215 |
run_cmd("python -m pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124")
|
216 |
run_cmd("python -m pip install -r requirements.txt")
|
217 |
|
|
|
|
|
|
|
|
|
|
|
218 |
|
219 |
def install(is_hf_space=False, cache_models=True):
|
220 |
install_lfs_files()
|