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() | |