make it run on gradio < 3.16.2

This commit is contained in:
AUTOMATIC 2023-01-21 20:07:14 +03:00
parent 3deea34135
commit f53527f778

View File

@ -1897,7 +1897,7 @@ def create_ui():
if type(x) == gr.Dropdown:
def check_dropdown(val):
if x.multiselect:
if getattr(x, 'multiselect', False):
return all([value in x.choices for value in val])
else:
return val in x.choices