Chris4K commited on
Commit
18600eb
·
verified ·
1 Parent(s): 33bb2af

Create config/config.py

Browse files
Files changed (1) hide show
  1. config/config.py +24 -0
config/config.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # config/config.py
2
+ from pydantic_settings import BaseSettings
3
+ from pathlib import Path
4
+ import torch
5
+
6
+ class Settings(BaseSettings):
7
+ MODEL_NAME: str = "mlx-community/Llama-3.2-3B-Instruct-8bit"
8
+ EMBEDDER_MODEL: str = "distiluse-base-multilingual-cased"
9
+ CHUNK_SIZE: int = 1000
10
+ CHUNK_OVERLAP: int = 100
11
+ CSV_URL: str = 'https://www.bofrost.de/datafeed/DE/products.csv'
12
+ PDF_FOLDER: Path = Path("./pdfs")
13
+ DEVICE: str = "cuda" if torch.cuda.is_available() else "cpu"
14
+ QUANTIZATION_BITS: int = 8
15
+ FAQ_ROOT_URL: str = "https://www.bofrost.de/faq/"
16
+ CACHE_DURATION: int = 3600
17
+ MAX_RETRIES: int = 3
18
+ TIMEOUT: int = 30
19
+
20
+ class Config:
21
+ env_file = ".env"
22
+
23
+ settings = Settings()
24
+