bhagatsuryainatom commited on
Commit
b37be24
·
verified ·
1 Parent(s): 47f27ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -6,10 +6,12 @@ import json
6
  import os
7
  from dotenv import load_dotenv
8
  import os
9
- from huggingface_hub import HfApi # Import HfApi
10
 
11
- api = HfApi() # Create an instance of HfApi
12
- api.set_space_sleep_time(repo_id="bhagatsuryainatom/Vesperal", sleep_time=None) # Set sleep time to None
 
 
13
 
14
  load_dotenv()
15
 
 
6
  import os
7
  from dotenv import load_dotenv
8
  import os
9
+ from huggingface_hub import HfApi, HfFolder
10
 
11
+ HfFolder.save_token(os.getenv("HUGGING_FACE_TOKEN")) # Save the token for authentication
12
+
13
+ api = HfApi()
14
+ api.set_space_sleep_time(repo_id="bhagatsuryainatom/Vesperal", sleep_time=None)
15
 
16
  load_dotenv()
17