Faculty-Finder-api / rag /utils.py
Urvikava's picture
Upload 54 files
997f52c verified
raw
history blame contribute delete
326 Bytes
import json
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parents[1]
DOCS_PATH = BASE_DIR / "rag" / "artifacts" / "faculty_documents.json"
def load_faculty_documents():
with open(DOCS_PATH, "r", encoding="utf-8") as f:
docs = json.load(f)
return {d["faculty_id"]: d for d in docs}