Spaces:
Sleeping
Sleeping
Add HF_TOKEN to App.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
from huggingface_hub import snapshot_download, hf_hub_download
|
| 2 |
import importlib.util
|
| 3 |
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# 1. Download a snapshot of the private Space’s repo into a local cache directory
|
| 6 |
cache_dir = Path("private_space_cache")
|
|
|
|
| 1 |
from huggingface_hub import snapshot_download, hf_hub_download
|
| 2 |
import importlib.util
|
| 3 |
from pathlib import Path
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
# 0. Immediately set the HF token from the secret
|
| 7 |
+
os.environ["HUGGINGFACE_TOKEN"] = os.getenv("HF_TOKEN")
|
| 8 |
|
| 9 |
# 1. Download a snapshot of the private Space’s repo into a local cache directory
|
| 10 |
cache_dir = Path("private_space_cache")
|