File size: 429 Bytes
5886996
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

def handler(in1, in2):
    return in1, in2

in1=gr.Textbox(label='多行輸入', lines=3, placeholder='請輸入內容')
in2=gr.Textbox(label='密碼輸入', type='password')
out1=gr.Textbox(lines=3)
out2=gr.Textbox(label='密碼內容')
iface=gr.Interface(
    fn=handler,
    inputs=[in1, in2],  
    outputs=[out1, out2],
    title='Textbox 元件測試',
    allow_flagging='never',
    )
iface.launch()