LiamKhoaLe commited on
Commit
d318182
·
1 Parent(s): 243b6fb
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -90,7 +90,7 @@ async def load_models():
90
  cache = Path("model_cache"); cache.mkdir(exist_ok=True)
91
  # in startup (Transformer Whisper processing)
92
  processor = WhisperProcessor.from_pretrained(ASR_MODEL_ID, cache_dir=cache)
93
- model = WhisperForConditionalGeneration.from_pretrained(ASR_MODEL_ID, cache_dir=cache_path)
94
  # Force English transcription – never translate
95
  forced = processor.get_decoder_prompt_ids(language="english", task="transcribe")
96
  model.config.forced_decoder_ids = forced
 
90
  cache = Path("model_cache"); cache.mkdir(exist_ok=True)
91
  # in startup (Transformer Whisper processing)
92
  processor = WhisperProcessor.from_pretrained(ASR_MODEL_ID, cache_dir=cache)
93
+ model = WhisperForConditionalGeneration.from_pretrained(ASR_MODEL_ID, cache_dir=cache)
94
  # Force English transcription – never translate
95
  forced = processor.get_decoder_prompt_ids(language="english", task="transcribe")
96
  model.config.forced_decoder_ids = forced