wanghuging commited on
Commit
54adf1a
·
1 Parent(s): 7a81f0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -36,7 +36,9 @@ if mps_available:
36
  torch_dtype = torch.float32
37
 
38
  t2i_pipe = StableDiffusionPipeline.from_single_file(
39
- "https://huggingface.co/wanghuging/skin_demo/blob/main/skin_demo.safetensors"
 
 
40
  )
41
 
42
  if SAFETY_CHECKER == "True":
@@ -146,7 +148,7 @@ with gr.Blocks(css=css) as demo:
146
  gr.Markdown(
147
  """# Derm-T2IM Text to Image Skin Cancer
148
  ## Demo
149
- **Model**: https://huggingface.co/stabilityai/sdxl-turbo
150
  """,
151
  elem_id="intro",
152
  )
@@ -158,12 +160,12 @@ with gr.Blocks(css=css) as demo:
158
  )
159
  generate_bt = gr.Button("Generate", scale=1)
160
  with gr.Row():
161
- with gr.Column():
162
- image_input = gr.Image(
163
- sources=["upload", "webcam", "clipboard"],
164
- label="Webcam",
165
- type="pil",
166
- )
167
  with gr.Column():
168
  image = gr.Image(type="filepath")
169
  with gr.Accordion("Advanced options", open=False):
 
36
  torch_dtype = torch.float32
37
 
38
  t2i_pipe = StableDiffusionPipeline.from_single_file(
39
+ "https://huggingface.co/wanghuging/skin_demo/blob/main/skin_demo.safetensors",
40
+ safety_checker = None,
41
+ requires_safety_checker = False
42
  )
43
 
44
  if SAFETY_CHECKER == "True":
 
148
  gr.Markdown(
149
  """# Derm-T2IM Text to Image Skin Cancer
150
  ## Demo
151
+ **Model**: https://huggingface.co/wanghuging/skin_demo
152
  """,
153
  elem_id="intro",
154
  )
 
160
  )
161
  generate_bt = gr.Button("Generate", scale=1)
162
  with gr.Row():
163
+ # with gr.Column():
164
+ # image_input = gr.Image(
165
+ # sources=["upload", "webcam", "clipboard"],
166
+ # label="Webcam",
167
+ # type="pil",
168
+ # )
169
  with gr.Column():
170
  image = gr.Image(type="filepath")
171
  with gr.Accordion("Advanced options", open=False):