fantos commited on
Commit
d6d81d9
ยท
verified ยท
1 Parent(s): 37571b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- gallery_path = path.join(os.getcwd(), "gallery") # ํ˜„์žฌ ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด์˜ gallery ํด๋”๋กœ ๋ณ€๊ฒฝ
 
 
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=[gallery_path]) # 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 ๋””๋ ‰ํ† ๋ฆฌ ์ „์ฒด์— ๋Œ€ํ•œ ์ ‘๊ทผ ํ—ˆ์šฉ