Spaces:
Runtime error
Runtime error
Download app_wrapper.py from hysts-samples/sample-public-demo-using-private-code: direct link, hf CLI and curl.
- Browser
- Download file 290 Bytes
-
https://huggingface.co/spaces/hysts-samples/sample-public-demo-using-private-code/resolve/main/app_wrapper.py
- Command line
-
hf download hf://spaces/hysts-samples/sample-public-demo-using-private-code/app_wrapper.py
-
curl -L -o app_wrapper.py https://huggingface.co/spaces/hysts-samples/sample-public-demo-using-private-code/resolve/main/app_wrapper.py
290 Bytes
| import shlex | |
| import subprocess | |
| from huggingface_hub import HfApi | |
| api = HfApi() | |
| api.snapshot_download(repo_id="hysts-samples/sample-private-repo", repo_type="space", local_dir=".") | |
| subprocess.run(shlex.split("pip install -r requirements.txt")) | |
| subprocess.run(shlex.split("python app.py")) | |