Spaces:
Runtime error
Runtime error
import gradio as gr | |
def get_image_size(image): | |
return f"{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", live=True) | |
iface.launch(show_api=False) |