Spaces:
Runtime error
Runtime error
Fix issue with csv files
Browse files
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(
|
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)
|