DarkSting commited on
Commit
effb79d
·
verified ·
1 Parent(s): 6062da0

Upload model_download.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. model_download.py +16 -0
model_download.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import snapshot_download
2
+ import os
3
+
4
+ HF_REPO = os.getenv("HF_REPO_ID", "DarkSting/tea_backend")
5
+ HF_TOKEN = os.getenv("HF_TOKEN", None)
6
+
7
+ print(f"Downloading files from {HF_REPO}...")
8
+
9
+ snapshot_download(
10
+ repo_id=HF_REPO,
11
+ repo_type="model", # or "dataset" depending on where you uploaded
12
+ local_dir="/app", # downloads into /app matching your structure
13
+ token=HF_TOKEN
14
+ )
15
+
16
+ print("Download complete.")