Spaces:
Runtime error
Runtime error
| import os | |
| # Embedding | |
| EMBEDDING_MODEL = "all-MiniLM-L6-v2" # Fast, lightweight, great for semantic search | |
| # LLM | |
| LLM_MODEL = "google/flan-t5-base" # Instruction-tuned, actually answers questions on CPU | |
| # Chunking | |
| CHUNK_SIZE = 500 | |
| CHUNK_OVERLAP = 100 | |
| MIN_CHUNK_SIZE = 100 # Skip tiny useless chunks | |
| # Retrieval | |
| TOP_K = 3 | |
| # Generation | |
| MAX_NEW_TOKENS = 200 | |
| TEMPERATURE = 0.2 # Low = more factual, less random | |
| # Storage | |
| VECTOR_STORE_PATH = "vectorstore/" | |
| # App | |
| DEVICE = "cpu" | |
| SUPPORTED_FORMATS = [".txt", ".pdf"] | |
| MAX_FILE_SIZE_MB = 10 | |