File size: 388 Bytes
4f63fb6
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from huggingface_hub import snapshot_download
import os
import subprocess

os.makedirs("data", exist_ok=True)

snapshot_download(repo_id=os.getenv("REPO_ID"),
                  repo_type="space",
                  local_dir="data",
                  token=os.getenv("HF_TOKEN"))

subprocess.run(["pip", "install", "-r", "data/requirements.txt"])

subprocess.run(["python", "data/app.py"])