tombetthauser commited on
Commit
c3f3334
Β·
1 Parent(s): 7e14edd

Use env token instead of colab login function

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -17,11 +17,11 @@ import torch
17
  import os
18
 
19
  # FOR DEPLOYMENT: uncomment these and delete the notebook_login() below
20
- # api_key = os.environ['api_key']
21
- # my_token = api_key
22
 
23
- from huggingface_hub import notebook_login
24
- notebook_login()
25
 
26
  import PIL
27
  from PIL import Image
@@ -132,6 +132,7 @@ downloaded_embedding_folder
132
  torch_dtype=torch.float16,
133
  text_encoder=text_encoder,
134
  tokenizer=tokenizer,
 
135
  ).to("cuda")
136
 
137
  completed_concept_pipes[repo_id_embeds] = pipe
 
17
  import os
18
 
19
  # FOR DEPLOYMENT: uncomment these and delete the notebook_login() below
20
+ api_key = os.environ['api_key']
21
+ my_token = api_key
22
 
23
+ # from huggingface_hub import notebook_login
24
+ # notebook_login()
25
 
26
  import PIL
27
  from PIL import Image
 
132
  torch_dtype=torch.float16,
133
  text_encoder=text_encoder,
134
  tokenizer=tokenizer,
135
+ use_auth_token=my_token,
136
  ).to("cuda")
137
 
138
  completed_concept_pipes[repo_id_embeds] = pipe