ysharma HF staff commited on
Commit
3bb26ab
1 Parent(s): 4236e26
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,7 +5,8 @@ import torch as th
5
  from torch import autocast
6
  from diffusers import StableDiffusionPipeline
7
 
8
- HF_TOKEN = os.environ.get("diffuse_new") or True
 
9
  has_cuda = th.cuda.is_available()
10
  device = th.device('cpu' if not th.cuda.is_available() else 'cuda')
11
  print(f"device is :{device}")
@@ -24,7 +25,7 @@ def get_sd(translated_txt):
24
 
25
  #API_URL = "https://api-inference.huggingface.co/models/bigscience/bloom"
26
  #HF_TOKEN = os.environ.get("diffuse_new") or True
27
- #HF_TOKEN = os.environ["HF_TOKEN"]
28
  #headers = {"Authorization": f"Bearer {HF_TOKEN}"}
29
  sd_inf = gr.Blocks.load(name="spaces/stabilityai/stable-diffusion", use_auth_token=HF_TOKEN )#'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')
30
 
 
5
  from torch import autocast
6
  from diffusers import StableDiffusionPipeline
7
 
8
+ HF_TOKEN = os.environ["HF_TOKEN"]
9
+ #HF_TOKEN = os.environ.get("diffuse_new") or True
10
  has_cuda = th.cuda.is_available()
11
  device = th.device('cpu' if not th.cuda.is_available() else 'cuda')
12
  print(f"device is :{device}")
 
25
 
26
  #API_URL = "https://api-inference.huggingface.co/models/bigscience/bloom"
27
  #HF_TOKEN = os.environ.get("diffuse_new") or True
28
+
29
  #headers = {"Authorization": f"Bearer {HF_TOKEN}"}
30
  sd_inf = gr.Blocks.load(name="spaces/stabilityai/stable-diffusion", use_auth_token=HF_TOKEN )#'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')
31