Spaces:
Running
Running
Update config.py
Browse files
config.py
CHANGED
@@ -1,10 +1,33 @@
|
|
1 |
import os
|
|
|
2 |
|
3 |
class Settings:
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
settings = Settings()
|
|
|
1 |
import os
|
2 |
+
from pathlib import Path
|
3 |
|
4 |
class Settings:
|
5 |
+
# Temel ayarlar
|
6 |
+
ENVIRONMENT = os.environ.get("ENVIRONMENT", "production")
|
7 |
+
DEBUG = False
|
8 |
+
|
9 |
+
# Hugging Face ayarları
|
10 |
+
HF_TOKEN = os.environ.get("HF_TOKEN", "")
|
11 |
+
HF_CACHE_DIR = Path("/root/.cache/huggingface")
|
12 |
+
|
13 |
+
# ASR ayarları
|
14 |
+
ASR_MODEL = "openai/whisper-large-v3"
|
15 |
+
DIAR_MODEL = "pyannote/speaker-diarization-3.1"
|
16 |
+
ANONYMIZE_DATA = True
|
17 |
+
ENHANCE_AUDIO = True
|
18 |
+
|
19 |
+
# Dosya boyutu limitleri
|
20 |
+
MAX_UPLOAD_SIZE = 25 * 1024 * 1024 # 25 MB
|
21 |
+
|
22 |
+
# Dil ayarları
|
23 |
+
LANGUAGE = "tr"
|
24 |
+
SPACY_MODEL = "tr_core_news_sm"
|
25 |
+
|
26 |
+
# Özel tıbbi terimler dosyası
|
27 |
+
MEDICAL_TERMS_FILE = "medical_terms.json"
|
28 |
+
|
29 |
+
# Önbellek ayarları
|
30 |
+
CACHE_DIR = Path("/tmp/voice_to_write_cache")
|
31 |
+
CACHE_DIR.mkdir(exist_ok=True)
|
32 |
|
33 |
settings = Settings()
|