bofenghuang commited on
Commit
683aeb8
·
1 Parent(s): 46c7e88
Files changed (3) hide show
  1. app.py +1 -1
  2. run_demo_openai.py +1 -3
  3. run_demo_openai_merged.py +1 -1
app.py CHANGED
@@ -1 +1 @@
1
- run_demo_openai.py
 
1
+ run_demo_openai_merged.py
run_demo_openai.py CHANGED
@@ -67,9 +67,7 @@ def maybe_load_cached_pipeline(model_name):
67
  if model is None:
68
  downloaded_model_path = hf_hub_download(repo_id=model_name, filename=CHECKPOINT_FILENAME)
69
 
70
- # model = whisper.load_model(downloaded_model_path, device=device)
71
- model = whisper.load_model(downloaded_model_path, device="cpu")
72
- model = model.to(device)
73
  logger.info(f"`{model_name}` has been loaded on device `{device}`")
74
 
75
  print_memory_info()
 
67
  if model is None:
68
  downloaded_model_path = hf_hub_download(repo_id=model_name, filename=CHECKPOINT_FILENAME)
69
 
70
+ model = whisper.load_model(downloaded_model_path, device=device)
 
 
71
  logger.info(f"`{model_name}` has been loaded on device `{device}`")
72
 
73
  print_memory_info()
run_demo_openai_merged.py CHANGED
@@ -140,7 +140,7 @@ def transcribe(microphone, file_upload, yt_url, with_timestamps, model_name=DEFA
140
  # text = model.transcribe(file, **GEN_KWARGS)["text"]
141
  text = infer(model, file, with_timestamps)
142
 
143
- logger.info(logging_prefix + "\n" + text)
144
 
145
  return warn_output + text
146
 
 
140
  # text = model.transcribe(file, **GEN_KWARGS)["text"]
141
  text = infer(model, file, with_timestamps)
142
 
143
+ logger.info(logging_prefix + "\n" + text + "\n")
144
 
145
  return warn_output + text
146