Seicas commited on
Commit
eae3904
·
verified ·
1 Parent(s): a80c513

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -24,8 +24,12 @@ THEME = gr.themes.Soft(
24
  )
25
  LOGO = "assets/pediatric_logo.png" # Logo ekleyin (opsiyonel)
26
 
27
- # SpaCy modelini yükle
28
- nlp = spacy.load("tr_core_news_md")
 
 
 
 
29
 
30
  # FastAPI uygulaması
31
  app = FastAPI(title="Pediatrik ASR API")
 
24
  )
25
  LOGO = "assets/pediatric_logo.png" # Logo ekleyin (opsiyonel)
26
 
27
+ # SpaCy modelini yükle (sm modeli kullan)
28
+ try:
29
+ nlp = spacy.load("tr_core_news_sm")
30
+ except OSError:
31
+ # Model yüklenemezse boş model kullan
32
+ nlp = spacy.blank("tr")
33
 
34
  # FastAPI uygulaması
35
  app = FastAPI(title="Pediatrik ASR API")