Spaces:
Sleeping
Sleeping
| import os | |
| # Hugging Face Spaces serve URL (๊ณต๊ฐ ์ค์ ์ด๋ฏ๋ก ์ง์ ์ฃผ์ ์ฌ์ฉ ๊ฐ๋ฅ) | |
| HF_SERVE_URL = os.getenv( | |
| "HF_SERVE_URL", | |
| "https://m97j-PersonaChatEngine.hf.space" | |
| ) | |
| # ์์ฒญ ํ์์์ (์ด ๋จ์) | |
| HF_TIMEOUT = float(os.getenv("HF_TIMEOUT", "25")) | |
| # RAG ํญ์ ์ฌ์ฉ (ํ ๊ธ์ด ์๋๋ผ ๊ณ ์ ์ฌ์ฉ) | |
| RAG_ENABLED = True | |
| # ์์ฑ ํ๋ผ๋ฏธํฐ ๊ธฐ๋ณธ๊ฐ (์์ฒญ๋ง๋ค override ๊ฐ๋ฅ) | |
| GENERATION_CONFIG = { | |
| "max_new_tokens": int(os.getenv("GEN_MAX_NEW_TOKENS", "220")), | |
| "temperature": float(os.getenv("GEN_TEMPERATURE", "0.7")), | |
| "top_p": float(os.getenv("GEN_TOP_P", "0.9")), | |
| "repetition_penalty": float(os.getenv("GEN_REPETITION_PENALTY", "1.1")), | |
| "do_sample": True | |
| } | |
| ''' | |
| # ๋ชจ๋ธ ์ ๋ณด (์ถํ ํ์ฅ ๊ฐ๋ฅ) | |
| MODEL_INFO = { | |
| "base_model": "meta-llama/Meta-Llama-3-8B", | |
| "adapter": "m97j/PersonaAdapter-v1", | |
| "serve_mode": "hf_spaces", # ๋๋ "local", "api" | |
| } | |
| ''' |