Spaces:
Sleeping
Sleeping
| # config.py - Centralized configuration and UI assets | |
| EMBED_MODEL = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2" | |
| RERANK_MODEL = "mixedbread-ai/mxbai-rerank-base-v1" | |
| CHROMA_PATH = "./chroma_ena_db" | |
| COLLECTION_NAME = "ena_collection" | |
| RRF_K = 60 | |
| TOP_K_SEARCH = 12 | |
| TOP_K_RERANK = 5 | |
| PAGE_URLS = { | |
| "concours_superieur": "https://www.ena.tn/fr/concours/cycle-superieur/le-concours-dentree-au-cycle-superieur/", | |
| "concours_general": "https://www.ena.tn/fr/concours/informations-generales/", | |
| "concours_a2": "https://www.ena.tn/fr/concours/cycle-moyen/concours-dentree-au-cycle-de-formation-des-cadres-moyens-de-la-sous-categorie-a2-2/", | |
| "concours_a3": "https://www.ena.tn/fr/concours/agents-de-la-sous-categorie-a3/", | |
| "formation_continue": "https://www.ena.tn/fr/formation-continue/formation-continue-a-distance-et-presentielle/", | |
| "ar_concours_general": "https://www.ena.tn/ar/concours-ar/informations-generales-ar/", | |
| "ar_concours_superieur": "https://www.ena.tn/ar/concours-ar/cycle-superieur-arr/concours-entree-cycle-superieur-ar/", | |
| "ar_concours_a2": "https://www.ena.tn/ar/concours-ar/cycle-moyen-ar/entree-au-cycle-de-formation-des-cadres-moyens-ar/", | |
| "ar_concours_a3": "https://www.ena.tn/ar/concours-ar/agents-categorie-a3-ar/", | |
| # ══ صفحات تتجدد باستمرار ══ | |
| "actualites_ar": "https://www.ena.tn/ar/actualites/", | |
| "actualites_fr": "https://www.ena.tn/fr/actualites/", | |
| "appels_offres": "https://www.ena.tn/ar/avis-et-appels-doffres/", | |
| } | |
| PROACTIVE_MAP = { | |
| "شروط الترشح": ["شروط الترشح للمرحلة العليا", "شروط مناظرة أ2", "السن القانوني"], | |
| "التحضير": ["برامج المناطرات", "مواضيع سابقة", "مراحل التكوين"], | |
| "التواصل": ["أرقام الهاتف", "مواقع الفروع", "ساعات العمل"] | |
| } | |
| UI_CSS = """ | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap'); | |
| :root { --primary: #1A374D; --secondary: #406882; --accent: #6998AB; --light: #F1F6F9; --border: #E2E8F0; --shadow: 0 4px 12px rgba(0,0,0,0.08); --muted: #718096; } | |
| * { font-family: 'Cairo', sans-serif; } | |
| .stApp { background: #F8FAFC; } | |
| /* RTL Support */ | |
| [data-testid="stSidebar"] { | |
| background: #0D2137; | |
| color: white; | |
| border-right: 1px solid rgba(255,255,255,0.1); | |
| } | |
| .welcome-banner { | |
| background: #1A374D; | |
| color: white; | |
| padding: 30px; | |
| border-radius: 0 0 24px 24px; | |
| text-align: center; | |
| margin: -60px -20px 20px -20px; | |
| box-shadow: 0 4px 15px rgba(0,0,0,0.1); | |
| } | |
| .chat-bubble { | |
| padding: 15px; | |
| border-radius: 15px; | |
| margin-bottom: 10px; | |
| direction: auto; | |
| } | |
| .user-bubble { background: #E2E8F0; color: black; } | |
| .bot-bubble { background: white; border: 1px solid #E2E8F0; } | |
| .source-card { | |
| background: white; | |
| padding: 10px; | |
| border-radius: 8px; | |
| border: 1px solid #E2E8F0; | |
| margin-bottom: 5px; | |
| font-size: 0.85em; | |
| } | |
| /* Animation */ | |
| @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } | |
| .fade-in { animation: fadeIn 0.5s ease-in; } | |
| </style> | |
| """ |