ehristoforu's picture
Create app.py
699a269
raw
history blame
447 Bytes
import gradio as gr
def get_image_size(image):
return f"Image size: {image.shape[0]} x {image.shape[1]}"
input_image = gr.Image(label="Input Image", scale=1, interactive=True)
output_text = gr.Textbox(label="Image Size", max_lines=1, show_copy_button=True, interactive=False)
iface = gr.Interface(fn=get_image_size, inputs=input_image, outputs=output_text, title="Image Size Detector", theme="zenafey/prodia-web")
iface.launch(show_api=False)