Update app.py
Browse files
app.py
CHANGED
@@ -22,16 +22,17 @@ For more information on `huggingface_hub` Inference API support, please check th
|
|
22 |
|
23 |
|
24 |
import os
|
25 |
-
from huggingface_hub import HfApi
|
|
|
26 |
|
|
|
27 |
|
28 |
username = 'islasher'
|
29 |
|
30 |
|
31 |
|
32 |
# Authenticate with Hugging Face
|
33 |
-
|
34 |
-
api.login()
|
35 |
|
36 |
# Fetch the API token secret
|
37 |
secret_name = "HF_API_TOKEN"
|
@@ -45,7 +46,7 @@ if api_token is None:
|
|
45 |
raise ValueError(f"Failed to retrieve API token from Hugging Face secret {secret_name}")
|
46 |
|
47 |
# Authenticate with Hugging Face using the API token
|
48 |
-
|
49 |
|
50 |
|
51 |
|
|
|
22 |
|
23 |
|
24 |
import os
|
25 |
+
#from huggingface_hub import HfApi
|
26 |
+
from huggingface_hub import login
|
27 |
|
28 |
+
#notebook_login()
|
29 |
|
30 |
username = 'islasher'
|
31 |
|
32 |
|
33 |
|
34 |
# Authenticate with Hugging Face
|
35 |
+
#login()
|
|
|
36 |
|
37 |
# Fetch the API token secret
|
38 |
secret_name = "HF_API_TOKEN"
|
|
|
46 |
raise ValueError(f"Failed to retrieve API token from Hugging Face secret {secret_name}")
|
47 |
|
48 |
# Authenticate with Hugging Face using the API token
|
49 |
+
login(token=api_token)
|
50 |
|
51 |
|
52 |
|