P01yH3dr0n commited on
Commit
8e56ed2
1 Parent(s): 0ac689b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import datetime
4
  import toml
5
  import gradio as gr
6
  from PIL import Image, PngImagePlugin
7
- from huggingface_hub import HfApi, hf_hub_download
8
 
9
  from pnginfo import read_info_from_image, send_paras
10
  from images_history import img_history_ui
@@ -196,7 +196,7 @@ def ui():
196
 
197
 
198
  if __name__ == '__main__':
199
- hf_hub_download(repo_id="P01yH3dr0n/naimages", subfolder="data_client", repo_type="dataset", local_dir="./", token=os.environ.get("hf_token"))
200
  website = ui()
201
  website.queue(default_concurrency_limit=5)
202
  website.launch(auth=(os.environ.get('account'), os.environ.get('password')), allowed_paths=['tagcomplete'], debug=True)
 
4
  import toml
5
  import gradio as gr
6
  from PIL import Image, PngImagePlugin
7
+ from huggingface_hub import HfApi, snapshot_download
8
 
9
  from pnginfo import read_info_from_image, send_paras
10
  from images_history import img_history_ui
 
196
 
197
 
198
  if __name__ == '__main__':
199
+ snapshot_download(repo_id="P01yH3dr0n/naimages", repo_type="dataset", local_dir="./", token=os.environ.get("hf_token"), allow_patterns="*.png")
200
  website = ui()
201
  website.queue(default_concurrency_limit=5)
202
  website.launch(auth=(os.environ.get('account'), os.environ.get('password')), allowed_paths=['tagcomplete'], debug=True)