Spaces:
Build error
Build error
Skip samples with apostrophes
Browse files- app_utils.py +2 -0
app_utils.py
CHANGED
|
@@ -57,6 +57,8 @@ def evaluate_prompt(prompt: str, num_samples: int = None, split: str = None, bat
|
|
| 57 |
for item in reader:
|
| 58 |
test_data.append(item)
|
| 59 |
|
|
|
|
|
|
|
| 60 |
# Limit to first num_samples items for faster evaluation
|
| 61 |
test_data = test_data[:num_samples]
|
| 62 |
|
|
|
|
| 57 |
for item in reader:
|
| 58 |
test_data.append(item)
|
| 59 |
|
| 60 |
+
test_data = [item for item in test_data if "'" not in item["shuffled_tokenized"] and "’" not in item["shuffled_tokenized"]]
|
| 61 |
+
|
| 62 |
# Limit to first num_samples items for faster evaluation
|
| 63 |
test_data = test_data[:num_samples]
|
| 64 |
|