Seicas commited on
Commit
16f9715
·
verified ·
1 Parent(s): acabbdd

Update routes.py

Browse files
Files changed (1) hide show
  1. routes.py +5 -3
routes.py CHANGED
@@ -8,7 +8,6 @@ from config import settings
8
  from typing import Optional
9
  import tempfile, os, uuid
10
  from fastapi.concurrency import run_in_threadpool
11
- from main import app
12
 
13
  router = APIRouter()
14
 
@@ -17,8 +16,11 @@ privacy_processor = MedicalPrivacyProcessor()
17
 
18
  def get_asr_model():
19
  """ASR modelini oluşturur ve döndürür"""
20
- # Ana uygulamadan konfigürasyonu al
21
- config = app.state.asr_config
 
 
 
22
  return MedicalASR(config)
23
 
24
  @router.post("/transcribe")
 
8
  from typing import Optional
9
  import tempfile, os, uuid
10
  from fastapi.concurrency import run_in_threadpool
 
11
 
12
  router = APIRouter()
13
 
 
16
 
17
  def get_asr_model():
18
  """ASR modelini oluşturur ve döndürür"""
19
+ config = {
20
+ "language": "tr",
21
+ "model": settings.ASR_MODEL,
22
+ "domain": "medical"
23
+ }
24
  return MedicalASR(config)
25
 
26
  @router.post("/transcribe")