DarkSting commited on
Commit
dcd128b
·
verified ·
1 Parent(s): a13f935

Upload huggingface.py

Browse files
Files changed (1) hide show
  1. huggingface.py +15 -0
huggingface.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) # needed if repo is private
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
+ )
14
+
15
+ print("Download complete.")