Spaces:
Sleeping
Sleeping
File size: 399 Bytes
206625f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from utils import get_questions
import json
import os
QUESTIONS_FILEPATH: str = os.getenv("QUESTIONS_FILEPATH", default="metadata.jsonl")
if __name__ == "__main__":
questions: list[dict] = get_questions()
# 2. Save to JSON file
with open(QUESTIONS_FILEPATH, "w") as f:
json.dump(questions, f, indent=4)
print(f"Saved {len(questions)} questions to {QUESTIONS_FILEPATH}")
|