AkiKagura commited on
Commit
ae2e8bd
1 Parent(s): 989361d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,7 +21,7 @@ device="cpu"
21
  img_pipe = StableDiffusionImg2ImgPipeline.from_pretrained("AkiKagura/mkgen-diffusion", use_auth_token=YOUR_TOKEN)
22
  img_pipe.to(device)
23
 
24
- source_img = gr.Image(source="canvas", type="filepath", tool='color-sketch', shape=[512, 512], label="new gradio color sketch")
25
 
26
  gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[1], height="auto")
27
 
@@ -50,6 +50,7 @@ print("done")
50
 
51
  title="Marco Generation Sketch"
52
  description="<p style='text-align: center;'>Draw and use 'mkmk woman' to get Marco pics. <br />Warning: Slow process... about 10 min inference time.</p>"
 
53
 
54
 
55
  gr.Interface(fn=infer, inputs=[source_img,
@@ -57,4 +58,4 @@ gr.Interface(fn=infer, inputs=[source_img,
57
  gr.Slider(2, 15, value = 7, label = 'Guidence Scale'),
58
  gr.Slider(10, 50, value = 25, step = 1, label = 'Number of Iterations'),
59
  gr.Slider(label = "Seed", minimum = 0, maximum = 2147483647, step = 1, randomize = True),
60
- gr.Slider(label='Strength', minimum = 0, maximum = 1, step = .05, value = .75)], outputs=gallery,title=title,description=description).queue(max_size=100).launch(enable_queue=True)
 
21
  img_pipe = StableDiffusionImg2ImgPipeline.from_pretrained("AkiKagura/mkgen-diffusion", use_auth_token=YOUR_TOKEN)
22
  img_pipe.to(device)
23
 
24
+ source_img = gr.Image(source="canvas", type="filepath", tool='color-sketch', label="new gradio color sketch")
25
 
26
  gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[1], height="auto")
27
 
 
50
 
51
  title="Marco Generation Sketch"
52
  description="<p style='text-align: center;'>Draw and use 'mkmk woman' to get Marco pics. <br />Warning: Slow process... about 10 min inference time.</p>"
53
+ custom_css = "style.css"
54
 
55
 
56
  gr.Interface(fn=infer, inputs=[source_img,
 
58
  gr.Slider(2, 15, value = 7, label = 'Guidence Scale'),
59
  gr.Slider(10, 50, value = 25, step = 1, label = 'Number of Iterations'),
60
  gr.Slider(label = "Seed", minimum = 0, maximum = 2147483647, step = 1, randomize = True),
61
+ gr.Slider(label='Strength', minimum = 0, maximum = 1, step = .05, value = .75)], outputs=gallery,title=title,description=description,css=custom_css).queue(max_size=100).launch(enable_queue=True)