ShreeKanade07 commited on
Commit
3a91639
·
verified ·
1 Parent(s): daf2630

added example section

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -16,7 +16,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
16
 
17
  from diffusers import StableDiffusionInpaintPipeline
18
  pipe = StableDiffusionInpaintPipeline.from_pretrained(
19
- "ShreeKanade07/Real-Image-pipeline", torch_dtype=torch.float32
20
  )
21
  #pipe = pipe.to("cuda")
22
 
@@ -42,7 +42,7 @@ def predict(image,mask,prompt):
42
  # Create the Gradio interface
43
  gr.Interface(
44
  predict,
45
- title='Stable Diffusion In-Painting',
46
  inputs=[
47
  gr.Image(label='Image'),
48
  gr.Image(label='Mask'),
@@ -50,5 +50,6 @@ gr.Interface(
50
  ],
51
  outputs=[
52
  gr.Image(label='Output Image')
53
- ]
 
54
  ).launch(debug=True, share=True)
 
16
 
17
  from diffusers import StableDiffusionInpaintPipeline
18
  pipe = StableDiffusionInpaintPipeline.from_pretrained(
19
+ "ShreeKanade07/Real-Image-pipeline", torch_dtype=torch.float16
20
  )
21
  #pipe = pipe.to("cuda")
22
 
 
42
  # Create the Gradio interface
43
  gr.Interface(
44
  predict,
45
+ title='Stable Diffusion Sketch In-Painting',
46
  inputs=[
47
  gr.Image(label='Image'),
48
  gr.Image(label='Mask'),
 
50
  ],
51
  outputs=[
52
  gr.Image(label='Output Image')
53
+ ],
54
+ examples=[["IMG1.jpg", "IMG1_Mask.jpg"]], cache_examples=True
55
  ).launch(debug=True, share=True)