MojicaPoC / load_json.py
Carlos Isael Ramírez González
Modelo nuevo completado
56ff037
raw
history blame contribute delete
412 Bytes
import json
def load_examples(path: str = 'examples.json'):
with open(path, "r", encoding="utf-8") as f:
return json.load(f)
examples = []
for category, items in data.items():
for item in items:
examples.append({
"category": category,
"question": item["pregunta"],
"sql": item["sql"]
})
return examples