Spaces:
Sleeping
Sleeping
Commit
·
8c201cf
1
Parent(s):
10df191
disabled the button and removed the empty captions
Browse files
app.py
CHANGED
|
@@ -199,6 +199,9 @@ def save_annotation(caption, session_data):
|
|
| 199 |
|
| 200 |
# Concatenate with the existing dataset and push the updated dataset to Hugging Face
|
| 201 |
dataset = concatenate_datasets([dataset, new_data])
|
|
|
|
|
|
|
|
|
|
| 202 |
dataset.push_to_hub(dataset_name)
|
| 203 |
print("Pushed updated dataset")
|
| 204 |
|
|
|
|
| 199 |
|
| 200 |
# Concatenate with the existing dataset and push the updated dataset to Hugging Face
|
| 201 |
dataset = concatenate_datasets([dataset, new_data])
|
| 202 |
+
|
| 203 |
+
dataset = dataset.filter(lambda example: example['caption'].strip() != "")
|
| 204 |
+
|
| 205 |
dataset.push_to_hub(dataset_name)
|
| 206 |
print("Pushed updated dataset")
|
| 207 |
|