Spaces:
Sleeping
Sleeping
import gradio as gr | |
def handler(in1): | |
msg=f'尺寸:(width, height)={in1.size}' | |
return msg, in1 | |
in1=gr.Image(label='上傳圖像', type='pil') | |
out1=gr.Textbox(label='輸出') | |
out2=gr.Image(label='圖像輸出') | |
iface=gr.Interface( | |
fn=handler, | |
inputs=[in1], | |
outputs=[out1, out2], | |
title='Image 元件測試', | |
allow_flagging='never', | |
) | |
iface.launch() |