1、Dropdown怎么默认选第一个值?
现在没有default参数去设置了,会报TypeError: __init__() got an unexpected keyword argument 'default' 。
正确的用法是用value=0去指定,但是不能写value=1制定第二个,所以需要把想默认制定的,放在choices列表的第一位。
gr.Dropdown(label="请选择", choices=list(select.values()), value=0)
1、Dropdown怎么默认选第一个值?
现在没有default参数去设置了,会报TypeError: __init__() got an unexpected keyword argument 'default' 。
正确的用法是用value=0去指定,但是不能写value=1制定第二个,所以需要把想默认制定的,放在choices列表的第一位。
gr.Dropdown(label="请选择", choices=list(select.values()), value=0)