krrishD commited on
Commit
0f9d2e0
1 Parent(s): 8898c09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import cv2
3
  import tempfile
4
  import inspect
5
  from typing import List, Optional, Union
6
-
7
  import numpy as np
8
  import torch
9
 
@@ -15,6 +15,8 @@ from transformers import CLIPFeatureExtractor, CLIPTextModel, CLIPTokenizer
15
  import gradio as gr
16
  import random
17
 
 
 
18
  device = "cuda"
19
  model_path = "CompVis/stable-diffusion-v1-4"
20
 
@@ -22,7 +24,7 @@ pipe = StableDiffusionInpaintingPipeline.from_pretrained(
22
  model_path,
23
  revision="fp16",
24
  torch_dtype=torch.float16,
25
- use_auth_token=True).to(device)
26
 
27
  import gdown
28
  def download_gdrive_url():
 
3
  import tempfile
4
  import inspect
5
  from typing import List, Optional, Union
6
+ import os
7
  import numpy as np
8
  import torch
9
 
 
15
  import gradio as gr
16
  import random
17
 
18
+ print("os.environ: ", os.environ)
19
+
20
  device = "cuda"
21
  model_path = "CompVis/stable-diffusion-v1-4"
22
 
 
24
  model_path,
25
  revision="fp16",
26
  torch_dtype=torch.float16,
27
+ use_auth_token=os.environ.get("access_token")).to(device)
28
 
29
  import gdown
30
  def download_gdrive_url():