Manjushri commited on
Commit
ac09539
1 Parent(s): e992aa5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -3,8 +3,11 @@ import modin.pandas as pd
3
  import torch
4
  import numpy as np
5
  from PIL import Image
6
- #from datasets import load_dataset
7
  from diffusers import StableDiffusionImg2ImgPipeline
 
 
 
 
8
 
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
  pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", safety_checker=None)
 
3
  import torch
4
  import numpy as np
5
  from PIL import Image
 
6
  from diffusers import StableDiffusionImg2ImgPipeline
7
+ from huggingface_hub import login
8
+ import os
9
+
10
+ login(token=os.environ.get('HF_KEY'))
11
 
12
  device = "cuda" if torch.cuda.is_available() else "cpu"
13
  pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", safety_checker=None)