edugp commited on
Commit
abf62cb
1 Parent(s): 9ebb2b0

Fix issue with csv files

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -132,7 +132,7 @@ if uploaded_file or hub_dataset:
132
  with st.spinner("Loading dataset..."):
133
  if uploaded_file:
134
  df = uploaded_file_to_dataframe(uploaded_file)
135
- df["perplexity"] = df[text_column].map(lambda x: model.get_perplexity(x[text_column]))
136
  else:
137
  df = hub_dataset_to_dataframe(hub_dataset, hub_dataset_config, hub_dataset_split, sample, text_column, kenlm_model, seed=SEED)
138
  plot = generate_plot(df, text_column, "perplexity", sample, dimensionality_reduction_function, model)
 
132
  with st.spinner("Loading dataset..."):
133
  if uploaded_file:
134
  df = uploaded_file_to_dataframe(uploaded_file)
135
+ df["perplexity"] = df[text_column].map(kenlm_model.get_perplexity)
136
  else:
137
  df = hub_dataset_to_dataframe(hub_dataset, hub_dataset_config, hub_dataset_split, sample, text_column, kenlm_model, seed=SEED)
138
  plot = generate_plot(df, text_column, "perplexity", sample, dimensionality_reduction_function, model)