AliHamza123 commited on
Commit
914a8dc
·
1 Parent(s): 428d989

another one

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -21,19 +21,19 @@ import shutil
21
 
22
  import os
23
  # from huggingface_hub import login
24
- # os.environ["TRANSFORMERS_CACHE"] = "/tmp/custom_cache"
25
- # os.makedirs("/tmp/custom_cache", exist_ok=True)
26
  # # Get the Hugging Face token from the environment variable
27
- # hf_token = os.getenv("HF_TOKEN")
28
-
29
- # if hf_token:
30
- # login(token=hf_token)
31
- # else:
32
- # print("Hugging Face token not found. Please set the HF_TOKEN environment variable.")
33
- # print("Logged in successfully.")
34
 
 
 
 
 
35
  print("Logged in successfully.")
36
 
 
 
37
 
38
  print(torch.__version__)
39
 
 
21
 
22
  import os
23
  # from huggingface_hub import login
24
+ os.environ["TRANSFORMERS_CACHE"] = "/tmp/custom_cache"
25
+ os.makedirs("/tmp/custom_cache", exist_ok=True)
26
  # # Get the Hugging Face token from the environment variable
27
+ hf_token = os.getenv("HF_TOKEN")
 
 
 
 
 
 
28
 
29
+ if hf_token:
30
+ login(token=hf_token)
31
+ else:
32
+ print("Hugging Face token not found. Please set the HF_TOKEN environment variable.")
33
  print("Logged in successfully.")
34
 
35
+ # print("Logged in successfully.")
36
+
37
 
38
  print(torch.__version__)
39