Skip to content

Commit

Permalink
Merge branch 'main' of github.com:beeldengeluid/dane-whisper-asr-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara Veldhoen committed Jul 12, 2024
2 parents f5efd20 + 8373dc7 commit f182cbd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
6 changes: 0 additions & 6 deletions base_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ def validate_config(config: CfgNode, validate_file_paths: bool = True) -> bool:
assert check_setting(
config.INPUT.S3_ENDPOINT_URL, str, True
), "INPUT.S3_ENDPOINT_URL"
assert check_setting(
config.INPUT.MODEL_CHECKPOINT_S3_URI, str, True
), "INPUT.MODEL_CHECKPOINT_S3_URI"
assert check_setting(
config.INPUT.MODEL_CONFIG_S3_URI, str, True
), "INPUT.MODEL_CONFIG_S3_URI"
assert check_setting(
config.INPUT.DELETE_ON_COMPLETION, bool
), "INPUT.DELETE_ON_COMPLETION"
Expand Down
5 changes: 1 addition & 4 deletions whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ def run_whisper(
"Failed to apply model (WHISPER_ASR_SETTINGS.MODEL not configured correctly)",
)

if (
cfg.WHISPER_ASR_SETTINGS.DEVICE != "cuda"
or cfg.WHISPER_ASR_SETTINGS.DEVICE != "cpu"
):
if cfg.WHISPER_ASR_SETTINGS.DEVICE not in ["cuda", "cpu"]:
return WhisperASROutput(
500,
"Failed to apply model (WHISPER_ASR_SETTINGS.DEVICE not configured correctly)",
Expand Down

0 comments on commit f182cbd

Please sign in to comment.