Spaces:
Sleeping
Sleeping
File size: 1,046 Bytes
11a64ab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# 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'
} |