ahmedghani commited on
Commit
17aad4c
1 Parent(s): 3d7e2e4

corrected whisper asr directory

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,6 @@ load_model()
11
  BASE_PATH = os.path.dirname(os.path.abspath(__file__))
12
  os.makedirs('input', exist_ok=True)
13
  os.makedirs('separated', exist_ok=True)
14
- os.makedirs('whisper_checkpoint', exist_ok=True)
15
 
16
  print("Loading ASR model...")
17
  processor = AutoProcessor.from_pretrained("openai/whisper-small")
@@ -23,6 +22,7 @@ if not os.path.exists("whisper_checkpoint"):
23
  feature_extractor=processor.feature_extractor,
24
  tokenizer=processor.tokenizer,
25
  )
 
26
  model.save_pretrained("whisper_checkpoint")
27
  else:
28
  model = ORTModelForSpeechSeq2Seq.from_pretrained("whisper_checkpoint", from_transformers=False)
 
11
  BASE_PATH = os.path.dirname(os.path.abspath(__file__))
12
  os.makedirs('input', exist_ok=True)
13
  os.makedirs('separated', exist_ok=True)
 
14
 
15
  print("Loading ASR model...")
16
  processor = AutoProcessor.from_pretrained("openai/whisper-small")
 
22
  feature_extractor=processor.feature_extractor,
23
  tokenizer=processor.tokenizer,
24
  )
25
+ os.makedirs('whisper_checkpoint', exist_ok=True)
26
  model.save_pretrained("whisper_checkpoint")
27
  else:
28
  model = ORTModelForSpeechSeq2Seq.from_pretrained("whisper_checkpoint", from_transformers=False)