Spaces:
Sleeping
Sleeping
File size: 2,135 Bytes
eec71cb be92fe5 eec71cb be92fe5 eec71cb be92fe5 | 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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | """Centralized configuration for DAIOE Explorer.
- Override dataset URLs via env vars (`DAIOE_SSYK2012_URL`, `DAIOE_SSYK96_URL`).
- UI option lists used by `app.py` live here.
"""
from __future__ import annotations
import os
from typing import Dict, List, Tuple
# Remote pre-translated datasets (can be overridden via env vars).
DAIOE_SSYK2012_URL = os.getenv(
"DAIOE_SSYK2012_URL",
"https://raw.githubusercontent.com/joseph-data/07_translate_ssyk/main/03_translated_files/daioe_ssyk2012_translated.csv",
)
DAIOE_SSYK96_URL = os.getenv(
"DAIOE_SSYK96_URL",
"https://raw.githubusercontent.com/joseph-data/07_translate_ssyk/main/03_translated_files/daioe_ssyk96_translated.csv",
)
DATASET_URLS: Dict[str, str] = {
"ssyk2012": DAIOE_SSYK2012_URL,
"ssyk96": DAIOE_SSYK96_URL,
}
# Default CSV separator used by weighting/aggregation.
DEFAULT_SEP: str = os.getenv("DAIOE_CSV_SEP", ",")
# Taxonomy and level options shared across UI/CLI.
TAXONOMY_OPTIONS: List[Tuple[str, str]] = [
("๐ธ๐ช SSYK 2012", "ssyk2012"),
("๐ธ๐ช SSYK 1996", "ssyk96"),
]
LEVEL_OPTIONS: List[Tuple[str, int]] = [
("Level 4 (4-digit)", 4),
("Level 3 (3-digit)", 3),
("Level 2 (2-digit)", 2),
("Level 1 (1-digit)", 1),
]
# Default UI selections.
DEFAULT_TAXONOMY = "ssyk2012"
DEFAULT_LEVEL = 3
DEFAULT_WEIGHTING = "emp_weighted"
DEFAULT_TOP_N = 10
DEFAULT_SORT_DESC = True
# Shared UI options.
METRIC_OPTIONS: List[Tuple[str, str]] = [
("๐ All Applications", "allapps"),
("โ๏ธ Abstract strategy games", "stratgames"),
("๐ฎ Real-time video games", "videogames"),
("๐ผ๏ธ๐ Image recognition", "imgrec"),
("๐งฉ๐ผ๏ธ Image comprehension", "imgcompr"),
("๐๏ธ๐ผ๏ธ Image generation", "imggen"),
("๐ Reading comprehension", "readcompr"),
("โ๏ธ๐ค Language modelling", "lngmod"),
("๐๐ค Translation", "translat"),
("๐ฃ๏ธ๐๏ธ Speech recognition", "speechrec"),
("๐ง โจ Generative AI", "genai"),
]
WEIGHTING_OPTIONS: List[Tuple[str, str]] = [
("Employment weighted", "emp_weighted"),
("Simple average", "simple_avg"),
]
|