FD900's picture
Update questions.py
89ab973 verified
raw
history blame
493 Bytes
import json
def get_all_questions():
try:
with open("metadata.jsonl", "r", encoding="utf-8") as f:
questions = [json.loads(line) for line in f]
print(f"✅ [questions.py] Loaded {len(questions)} questions from metadata.jsonl")
return questions
except FileNotFoundError:
print("❌ metadata.jsonl not found.")
return []
except json.JSONDecodeError as e:
print(f"❌ Failed to parse metadata.jsonl: {e}")
return []