Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -89,6 +89,10 @@ def load_questions():
|
|
| 89 |
processed_item.pop('Final answer', None) # Remove Final answer
|
| 90 |
processed_item.pop('Annotator Annotation', None) # Remove Annotator Annotation
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
# Store in questions_for_api
|
| 93 |
questions_for_api.append(processed_item)
|
| 94 |
|
|
|
|
| 89 |
processed_item.pop('Final answer', None) # Remove Final answer
|
| 90 |
processed_item.pop('Annotator Annotation', None) # Remove Annotator Annotation
|
| 91 |
|
| 92 |
+
# Ensure the field name matches what's expected by Pydantic models
|
| 93 |
+
if 'Question' in processed_item and 'question' not in processed_item:
|
| 94 |
+
processed_item['question'] = processed_item.pop('Question')
|
| 95 |
+
|
| 96 |
# Store in questions_for_api
|
| 97 |
questions_for_api.append(processed_item)
|
| 98 |
|