SergeyO7 commited on
Commit
b8c02a1
·
verified ·
1 Parent(s): 9b78643

Create app2chk

Browse files
Files changed (1) hide show
  1. app2chk +11 -0
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)