matanninio commited on
Commit
0e5beb4
1 Parent(s): cb75880

when no chose, do not let use chose model

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -76,8 +76,9 @@ def create_application():
76
  if value in model.tasks
77
  ]
78
  if choices:
 
79
  return (
80
- gr.update(choices=choices, value=choices[0], visible=True, label=f"Matching Mammal models ({len(choices)})",),
81
  *visibility,
82
  )
83
  else:
 
76
  if value in model.tasks
77
  ]
78
  if choices:
79
+ active = len(choices)>1
80
  return (
81
+ gr.update(choices=choices, value=choices[0], interactive=active, visible=True, label=f"Matching Mammal models ({len(choices)})",),
82
  *visibility,
83
  )
84
  else: