saattrupdan commited on
Commit
0360399
1 Parent(s): 81fc601

feat: Select 2 models if possible

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -465,7 +465,10 @@ def update_model_ids_dropdown(
465
  model_id for model_id in model_ids if model_id in filtered_models
466
  ]
467
  if not valid_selected_models:
468
- valid_selected_models = random.sample(filtered_models, k=1)
 
 
 
469
 
470
  logger.info(
471
  f"Updated model ids dropdown with {len(filtered_models):,} valid models for "
 
465
  model_id for model_id in model_ids if model_id in filtered_models
466
  ]
467
  if not valid_selected_models:
468
+ if len(filtered_models) > 1:
469
+ valid_selected_models = random.sample(filtered_models, k=2)
470
+ elif len(filtered_models) == 1:
471
+ valid_selected_models = random.sample(filtered_models, k=1)
472
 
473
  logger.info(
474
  f"Updated model ids dropdown with {len(filtered_models):,} valid models for "