Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from PIL import Image
|
3 |
+
|
4 |
+
def resize_image(img, W, H):
|
5 |
+
resized_img = img.resize((W, H))
|
6 |
+
return resized_img
|
7 |
+
|
8 |
+
iface = gr.Interface(
|
9 |
+
fn=resize_image,
|
10 |
+
inputs=["image", "number", "number"],
|
11 |
+
outputs="image"
|
12 |
+
)
|
13 |
+
|
14 |
+
iface.launch()
|