Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,9 @@ cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
|
18 |
# Setup and initialization code
|
19 |
cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
20 |
# Change gallery path to user's home directory for persistence
|
21 |
-
|
|
|
|
|
22 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
23 |
os.environ["HF_HUB_CACHE"] = cache_path
|
24 |
os.environ["HF_HOME"] = cache_path
|
@@ -361,4 +363,4 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
361 |
)
|
362 |
|
363 |
if __name__ == "__main__":
|
364 |
-
demo.launch(allowed_paths=[
|
|
|
18 |
# Setup and initialization code
|
19 |
cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
20 |
# Change gallery path to user's home directory for persistence
|
21 |
+
# Setup and initialization code
|
22 |
+
# Hugging Face Spaces permanent storage path
|
23 |
+
gallery_path = "/data/gallery" # ์๊ตฌ ์ ์ฅ์ ์ํ Spaces /data ๋๋ ํ ๋ฆฌ ์ฌ์ฉ
|
24 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
25 |
os.environ["HF_HUB_CACHE"] = cache_path
|
26 |
os.environ["HF_HOME"] = cache_path
|
|
|
363 |
)
|
364 |
|
365 |
if __name__ == "__main__":
|
366 |
+
demo.launch(allowed_paths=["/data"]) # /data ๋๋ ํ ๋ฆฌ ์ ์ฒด์ ๋ํ ์ ๊ทผ ํ์ฉ
|