laminar commited on
Commit
573e111
1 Parent(s): 86cc4cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -10,6 +10,7 @@ import re
10
  model_id = "CompVis/stable-diffusion-v1-4"
11
  device = "cuda"
12
 
 
13
  #If you are running this code locally, you need to either do a 'huggingface-cli login` or paste your User Access Token from here https://huggingface.co/settings/tokens into the use_auth_token field below.
14
  pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True, revision="fp16", torch_dtype=torch.float16)
15
  pipe = pipe.to(device)
 
10
  model_id = "CompVis/stable-diffusion-v1-4"
11
  device = "cuda"
12
 
13
+ auth_token = os.environ.get("READ_TOKEN")
14
  #If you are running this code locally, you need to either do a 'huggingface-cli login` or paste your User Access Token from here https://huggingface.co/settings/tokens into the use_auth_token field below.
15
  pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True, revision="fp16", torch_dtype=torch.float16)
16
  pipe = pipe.to(device)