Spaces:
Sleeping
Sleeping
Create app2chk
Browse files
app2chk
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
from huggingface_hub import login
|
3 |
+
|
4 |
+
# Retrieve the HF token from the environment variables
|
5 |
+
hf_token = os.getenv("HF_TOKEN")
|
6 |
+
|
7 |
+
if hf_token is None:
|
8 |
+
raise ValueError("HF_TOKEN is not set in the environment variables.")
|
9 |
+
|
10 |
+
# Use the token to log in
|
11 |
+
login(token=hf_token)
|