Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,23 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
demo.launch()
|
| 4 |
|
| 5 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def nagelize():
|
| 4 |
+
return gr.Image()
|
| 5 |
+
|
| 6 |
+
def clear():
|
| 7 |
+
return gr.Image()
|
| 8 |
+
|
| 9 |
+
with gr.Blocks() as demo:
|
| 10 |
+
|
| 11 |
+
gr.markup()
|
| 12 |
+
|
| 13 |
+
gr.load("mswhite/miamivice", src="models")
|
| 14 |
+
|
| 15 |
+
art_to_draw = gr.Textbox(label="Draw")
|
| 16 |
+
output = gr.Image(label="Output")
|
| 17 |
+
clear_btn = gr.Button("Clear")
|
| 18 |
+
submit_btn = gr.Button("Submit")
|
| 19 |
+
submit_btn.click(fn=nagelize, inputs=[art_work], outputs=[output])
|
| 20 |
+
|
| 21 |
demo.launch()
|
| 22 |
|
| 23 |
|