Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def generate(image_editor):
|
4 |
+
return image_editor
|
5 |
+
|
6 |
+
with gr.Blocks() as demo:
|
7 |
+
gr.Markdown("""
|
8 |
+
# Inpainting Sketch Pad
|
9 |
+
by [Tony Assi](https://www.tonyassi.com/)
|
10 |
+
""")
|
11 |
+
|
12 |
+
with gr.Row():
|
13 |
+
#with gr.Column():
|
14 |
+
version_gallery = gr.Gallery()
|
15 |
+
restore_button = gr.Button("Restore Version")
|
16 |
+
#with gr.Column():
|
17 |
+
sketch_pad = gr.ImageEditor()
|
18 |
+
generate_button = gr.Button("Generate")
|
19 |
+
|
20 |
+
|
21 |
+
with gr.Row():
|
22 |
+
out1 = gr.Image()
|
23 |
+
out2 = gr.Image()
|
24 |
+
out3 = gr.Image()
|
25 |
+
|
26 |
+
generate_button.click(fn=generate, inputs=sketch_pad, outputs=sketch_pad)
|
27 |
+
|
28 |
+
demo.launch()
|