kadirnar commited on
Commit
74d3344
1 Parent(s): ca49949

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -42
app.py CHANGED
@@ -1,48 +1,25 @@
 
1
  import gradio as gr
2
 
3
- from diffusion_webui import (
4
- StableDiffusionControlNetGenerator,
5
- StableDiffusionControlNetInpaintGenerator,
6
- StableDiffusionImage2ImageGenerator,
7
- StableDiffusionInpaintGenerator,
8
- StableDiffusionText2ImageGenerator,
9
- )
10
 
11
-
12
- def diffusion_app():
13
- app = gr.Blocks()
14
- with app:
15
- gr.HTML(
16
  """
17
- <h1 style='text-align: center'>
18
- Stable Diffusion + ControlNet + Inpaint
19
- </h1>
 
 
20
  """
21
- )
22
- gr.HTML(
23
- """
24
- <h3 style='text-align: center'>
25
- Follow me for more!
26
- <a href='https://twitter.com/kadirnar_ai' target='_blank'>Twitter</a> | <a href='https://github.com/kadirnar' target='_blank'>Github</a> | <a href='https://www.linkedin.com/in/kadir-nar/' target='_blank'>Linkedin</a>
27
- </h3>
28
- """
29
- )
30
- with gr.Row():
31
- with gr.Column():
32
- with gr.Tab(label="Text2Image"):
33
- StableDiffusionText2ImageGenerator.app()
34
- with gr.Tab(label="Image2Image"):
35
- StableDiffusionImage2ImageGenerator.app()
36
- with gr.Tab(label="Inpaint"):
37
- StableDiffusionInpaintGenerator.app()
38
- with gr.Tab(label="Controlnet"):
39
- StableDiffusionControlNetGenerator.app()
40
- with gr.Tab(label="Controlnet Inpaint"):
41
- StableDiffusionControlNetInpaintGenerator.app()
42
-
43
- app.queue(concurrency_count=1)
44
- app.launch(debug=True, enable_queue=True)
45
-
46
 
47
- if __name__ == "__main__":
48
- diffusion_app()
 
1
+ from stable_cascade import web_demo
2
  import gradio as gr
3
 
 
 
 
 
 
 
 
4
 
5
+ gradio_app = gr.Blocks()
6
+ with gradio_app:
7
+ gr.HTML(
 
 
8
  """
9
+ <h1 style='text-align: center'>
10
+ Stable Cascade 🚀
11
+ </h1>
12
+ """)
13
+ gr.HTML(
14
  """
15
+ <h3 style='text-align: center'>
16
+ Follow me for more!
17
+ <a href='https://twitter.com/kadirnar_ai' target='_blank'>Twitter</a> | <a href='https://github.com/kadirnar' target='_blank'>Github</a> | <a href='https://www.linkedin.com/in/kadir-nar/' target='_blank'>Linkedin</a> | <a href='https://www.huggingface.co/kadirnar/' target='_blank'>HuggingFace</a>
18
+ </h3>
19
+ """)
20
+ with gr.Row():
21
+ with gr.Column():
22
+ web_demo()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ gradio_app.queue()
25
+ gradio_app.launch(debug=True)