Zaherrr commited on
Commit
d61a403
·
verified ·
1 Parent(s): 1368f1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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