Spaces:
Sleeping
Sleeping
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 |