daniel-wojahn commited on
Commit
a7f196f
·
1 Parent(s): 7ed74d5

fix: correctly handle hf model selection in UI

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -385,9 +385,8 @@ Each segment is represented as a vector of these TF-IDF scores, and the cosine s
385
  if model_name == "Facebook FastText (Pre-trained)":
386
  internal_model_id = "facebook-fasttext-pretrained"
387
  else:
388
- # Fallback or error if unexpected model_name, though UI should prevent this
389
- logger.warning(f"Unexpected model_name from UI: {model_name}. Defaulting to facebook-fasttext-pretrained.")
390
- internal_model_id = "facebook-fasttext-pretrained"
391
 
392
  df_results, word_counts_df_data, warning_raw = process_texts(
393
  text_data,
 
385
  if model_name == "Facebook FastText (Pre-trained)":
386
  internal_model_id = "facebook-fasttext-pretrained"
387
  else:
388
+ # For Hugging Face models, the UI value is the correct model ID
389
+ internal_model_id = model_name
 
390
 
391
  df_results, word_counts_df_data, warning_raw = process_texts(
392
  text_data,