echoece commited on
Commit
2f0f763
·
verified ·
1 Parent(s): d95e9eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,17 +1,15 @@
1
  import gradio as gr
2
- from diffusers import StableDiffusionPipeline
3
  import torch
4
  import os
5
 
6
-
7
- model_id = "Kotiko-ua/tryondiffusion-model"
8
  token = os.getenv("HF_TOKEN")
9
 
10
- pipe = StableDiffusionPipeline.from_pretrained(
11
- model_id,
12
- use_auth_token=token,
13
- torch_dtype=torch.float16
14
  )
 
15
  pipe = pipe.to("cuda" if torch.cuda.is_available() else "cpu")
16
 
17
  def try_on(person_img, cloth_img):
 
1
  import gradio as gr
2
+ from diffusers import DiffusionPipeline
3
  import torch
4
  import os
5
 
 
 
6
  token = os.getenv("HF_TOKEN")
7
 
8
+ pipe = DiffusionPipeline.from_pretrained(
9
+ "Kotiko-ua/tryondiffusion-model",
10
+ use_auth_token=token # if the repo is gated
 
11
  )
12
+
13
  pipe = pipe.to("cuda" if torch.cuda.is_available() else "cpu")
14
 
15
  def try_on(person_img, cloth_img):