Spaces:
Running
Running
# config.py | |
import os | |
# HuggingFace settings | |
HF_TOKEN = os.getenv("HF_TOKEN") # Set in Space secrets | |
LEADERBOARD_DATASET = "Sunbird/salt-translation-leaderboard" | |
SALT_DATASET = "sunbird/salt" | |
# Model settings | |
MAX_MODEL_SIZE_GB = 15 # Limit for HF Space | |
SUPPORTED_MODEL_TYPES = [ | |
"gemma", "qwen", "llama", "nllb", "google-translate" | |
] | |
# Evaluation settings | |
MAX_EVAL_SAMPLES = 200 # Limit for faster evaluation | |
BATCH_SIZE = 4 | |
MAX_NEW_TOKENS = 100 | |
# UI settings | |
TITLE = "π SALT Translation Model Leaderboard" | |
DESCRIPTION = """ | |
Evaluate your translation models on Ugandan languages! | |
Submit a HuggingFace model and see how it performs on Luganda, Acholi, and Swahili translation tasks. | |
""" | |
# Supported languages (Google Translate compatible subset) | |
SUPPORTED_LANGUAGES = ['lug', 'ach', 'swa', 'eng'] | |
LANGUAGE_NAMES = { | |
'lug': 'Luganda', | |
'ach': 'Acholi', | |
'swa': 'Swahili', | |
'eng': 'English' | |
} | |
# Google Translate language mapping | |
GOOGLE_LANG_MAP = { | |
'lug': 'lg', | |
'ach': 'ach', | |
'swa': 'sw', | |
'eng': 'en' | |
} |