Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,10 +18,11 @@ from huggingface_hub import HfApi
|
|
18 |
# Set your Hugging Face API token in the settings of this space as a secret variable
|
19 |
|
20 |
# Authenticate using HfApi
|
21 |
-
api = HfApi()
|
22 |
-
api.login(token=os.getenv("HUGGINGFACE_HUB_TOKEN"))
|
23 |
-
|
24 |
|
|
|
|
|
25 |
|
26 |
# ---------------------------------------------------------------------------------------------------------------------------------------
|
27 |
# Loading the translation model and english and french tokenizers
|
|
|
18 |
# Set your Hugging Face API token in the settings of this space as a secret variable
|
19 |
|
20 |
# Authenticate using HfApi
|
21 |
+
# api = HfApi()
|
22 |
+
# api.login(token=os.getenv("HUGGINGFACE_HUB_TOKEN"))
|
|
|
23 |
|
24 |
+
from huggingface_hub import login
|
25 |
+
login(token=os.getenv("HUGGINGFACE_HUB_TOKEN"))
|
26 |
|
27 |
# ---------------------------------------------------------------------------------------------------------------------------------------
|
28 |
# Loading the translation model and english and french tokenizers
|