from dataclasses import dataclass from typing import Dict, List @dataclass class DatasetConfig: leaderboard_path: str = "hf://datasets/alibayram/yapay_zeka_turkce_mmlu_liderlik_tablosu/data/train-00000-of-00001.parquet" responses_path: str = "hf://datasets/alibayram/yapay_zeka_turkce_mmlu_model_cevaplari/data/train-00000-of-00001.parquet" section_results_path: str = "hf://datasets/alibayram/yapay_zeka_turkce_mmlu_bolum_sonuclari/data/train-00000-of-00001.parquet" cache_dir: str = "cache" refresh_interval: int = 1800 # 30 dakika request_timeout: int = 60 # saniye max_retries: int = 5 retry_delay: int = 2 # saniye @dataclass class UIConfig: title: str = "🏆 Türkçe MMLU Liderlik Tablosu" description: str = "Yapay zeka modellerinin Türkçe dil görevlerindeki performansını keşfedin, değerlendirin ve karşılaştırın." theme: str = "soft" css: str = """ /* Geliştirilmiş Modern UI Stilleri */ .gradio-container { max-width: 1400px !important; margin: 0 auto !important; padding: 20px !important; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; } /* Başlık Geliştirmeleri */ .main-header { text-align: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px 20px; border-radius: 20px; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); } /* Buton Geliştirmeleri */ .gr-button { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; border: none !important; border-radius: 10px !important; padding: 12px 24px !important; font-weight: 600 !important; color: white !important; box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3) !important; transition: all 0.3s ease !important; } .gr-button:hover { transform: translateY(-2px) !important; box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important; } /* Tablo Geliştirmeleri */ .gr-dataframe { border-radius: 15px !important; overflow: hidden !important; box-shadow: 0 5px 20px rgba(0,0,0,0.08) !important; border: 1px solid #f0f0f0 !important; } .gr-dataframe th { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important; color: #495057 !important; font-weight: 600 !important; padding: 15px 12px !important; } .gr-dataframe tr:hover { background-color: #f8f9ff !important; } /* Kart Stilleri */ .card { background: white; border-radius: 15px; padding: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; margin-bottom: 20px; } /* Durum Mesajları */ .success-message { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); color: white; padding: 15px 20px; border-radius: 10px; margin: 10px 0; font-weight: 500; } .error-message { background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%); color: white; padding: 15px 20px; border-radius: 10px; margin: 10px 0; font-weight: 500; } /* Duyarlı Tasarım */ @media (max-width: 768px) { .gradio-container { padding: 10px !important; } .main-header h1 { font-size: 2rem !important; } .card { padding: 15px; } } """ @dataclass class ModelConfig: precision_options: List[str] = ("float16", "int8", "bfloat16", "float32", "int4") weight_types: List[str] = ("Orijinal", "Delta", "Adaptör", "LoRA", "QLoRA") model_types: List[str] = ("Transformer", "RNN", "GPT", "BERT", "T5", "Diğer") @dataclass class AppConfig: """Geliştirilmiş uygulama yapılandırması""" server_name: str = "0.0.0.0" server_port: int = 7860 share: bool = False debug: bool = False show_error: bool = True max_threads: int = 40 default_concurrency_limit: int = 40 enable_queue: bool = True @dataclass class PerformanceConfig: """Performans ve önbellekleme yapılandırması""" enable_caching: bool = True cache_timeout: int = 3600 # 1 saat max_cache_size: int = 100 # MB enable_compression: bool = True CONFIG = { "dataset": DatasetConfig(), "ui": UIConfig(), "model": ModelConfig(), "app": AppConfig(), "performance": PerformanceConfig(), }