Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,8 +32,9 @@ def update_transcriptions(df, dataset, token,dataset_link):
|
|
32 |
|
33 |
# Replace the original transcription column in the dataset
|
34 |
dataset = dataset.map(
|
35 |
-
lambda examples, idx: {"transcription": updated_dataset["transcription"][idx]} if updated_dataset["transcription"][idx].strip() != "" else
|
36 |
-
with_indices=True
|
|
|
37 |
# lambda examples, idx: {"transcription": updated_dataset["transcription"][idx]},
|
38 |
# with_indices=True
|
39 |
)
|
@@ -133,7 +134,7 @@ def main():
|
|
133 |
submit_button.click(submit_changes, [table, hf_token,dataset_link], output_message)
|
134 |
|
135 |
# Launch Gradio Interface
|
136 |
-
interface.launch(
|
137 |
|
138 |
|
139 |
|
|
|
32 |
|
33 |
# Replace the original transcription column in the dataset
|
34 |
dataset = dataset.map(
|
35 |
+
lambda examples, idx: {"transcription": updated_dataset["transcription"][idx]} if updated_dataset["transcription"][idx].strip() != "" else [],
|
36 |
+
with_indices=True,
|
37 |
+
batched=True # Required to handle the list-based filtering
|
38 |
# lambda examples, idx: {"transcription": updated_dataset["transcription"][idx]},
|
39 |
# with_indices=True
|
40 |
)
|
|
|
134 |
submit_button.click(submit_changes, [table, hf_token,dataset_link], output_message)
|
135 |
|
136 |
# Launch Gradio Interface
|
137 |
+
interface.launch()
|
138 |
|
139 |
|
140 |
|