INNER CODE UNIT · Python

global_status

Dsadd4/AgentFigureGallery · agentfiguregallery/server.py:112

def global_status(root: Path, candidate: dict) -> str:
    prefs = load_global_preferences(root)
    key = global_preference_key(candidate)
    if key in set(prefs.get("rejected", [])):
        return "global_rejected"
    if key in set(prefs.get("liked", [])):
        return "global_liked"
    return "none"


def index_path(root: Path) -> Path:
    return root / "data" / "reference_candidate_index.json"


def load_index(root: Path) -> dict:
    return read_json(index_path(root), {"candidates": [], "summary": {}})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…