Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from super_resolution import cartoon_upsampling_8x
|
3 |
+
|
4 |
+
def greet(name):
|
5 |
+
return "Hello " + name + "!!"
|
6 |
+
|
7 |
+
def transformation(image):
|
8 |
+
large_image = cartoon_upsampling_8x(image, 'a_8x_larger_output_image.png' )
|
9 |
+
return large_image
|
10 |
+
|
11 |
+
with gr.Blocks() as demo:
|
12 |
+
image1=gr.Image()
|
13 |
+
button=gr.Button("LE BOUTON")
|
14 |
+
image2=gr.Image()
|
15 |
+
button.click(fn=transformation,input=image1,output=image2,api_name="upscale")
|
16 |
+
|
17 |
+
|
18 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
19 |
+
demo.launch()
|