meg/backend
1
1import os2 3from huggingface_hub import HfApi4 5# Org/username where things are read/written6OWNER = "meg"7# Read/write token8TOKEN = os.environ.get("HF_TOKEN")9API = HfApi(token=TOKEN)10# Key for Perspective API11PERSPECTIVE_API_KEY = os.environ.get("PERSPECTIVE_API_KEY")12 13# Number of lines to read in the eval file, or None for all.14EVAL_CUTOFF = 120 # !!!! For testing, should be None for actual evaluations!!!15# How often to try to run eval.16REFRESH_RATE = 5 * 60 # 5 min17# How many lines to display in the log visualizer18NUM_LINES_VISUALIZE = 30019 20# Where results are displayed21REPO_ID = f"{OWNER}/leaderboard"22# Dataset directory where the requests are created23REQUESTS_REPO = f"{OWNER}/requests"24# Dataset directory where the results are written to25RESULTS_REPO = f"{OWNER}/results"26 27# If you set up a cache later, set HF_HOME to where it is28CACHE_PATH = os.getenv("HF_HOME", ".")29# Local caches30EVAL_REQUESTS_PATH = os.path.join(CACHE_PATH, "eval-requests")31EVAL_RESULTS_PATH = os.path.join(CACHE_PATH, "eval-results")32EVAL_REQUESTS_PATH_BACKEND = os.path.join(CACHE_PATH, "eval-queue-bk")33EVAL_RESULTS_PATH_BACKEND = os.path.join(CACHE_PATH, "eval-results-bk")34 