File size: 286 Bytes
c4c6b42 7804bee c4c6b42 86c535d c4c6b42 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
from PIL import Image
def resize_image(img, W, H):
resized_img = Image.fromarray(img).resize((int(W), int(H)))
return resized_img
iface = gr.Interface(
fn=resize_image,
inputs=["image", "number", "number"],
outputs="image"
)
iface.launch()
|