Spaces:
Runtime error
Runtime error
Upload config.py
Browse files
config.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
# Embedding
|
| 4 |
+
EMBEDDING_MODEL = "all-MiniLM-L6-v2" # Fast, lightweight, great for semantic search
|
| 5 |
+
|
| 6 |
+
# LLM
|
| 7 |
+
LLM_MODEL = "google/flan-t5-base" # Instruction-tuned, actually answers questions on CPU
|
| 8 |
+
|
| 9 |
+
# Chunking
|
| 10 |
+
CHUNK_SIZE = 500
|
| 11 |
+
CHUNK_OVERLAP = 100
|
| 12 |
+
MIN_CHUNK_SIZE = 100 # Skip tiny useless chunks
|
| 13 |
+
|
| 14 |
+
# Retrieval
|
| 15 |
+
TOP_K = 3
|
| 16 |
+
|
| 17 |
+
# Generation
|
| 18 |
+
MAX_NEW_TOKENS = 200
|
| 19 |
+
TEMPERATURE = 0.2 # Low = more factual, less random
|
| 20 |
+
|
| 21 |
+
# Storage
|
| 22 |
+
VECTOR_STORE_PATH = "vectorstore/"
|
| 23 |
+
|
| 24 |
+
# App
|
| 25 |
+
DEVICE = "cpu"
|
| 26 |
+
SUPPORTED_FORMATS = [".txt", ".pdf"]
|
| 27 |
+
MAX_FILE_SIZE_MB = 10
|