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 디렉토리 전체에 λŒ€ν•œ μ ‘κ·Ό ν—ˆμš©