Jiayi-Pan commited on
Commit
c4c6b42
1 Parent(s): c4e2bf8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
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()