Skip to content

Commit 6ec8658

Browse files
author
David Rubinstein
committed
Default predict() to the default model path from __init__.py.
1 parent 3505516 commit 6ec8658

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

basic_pitch/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union, cast
2525

2626

27-
from basic_pitch import CT_PRESENT, ONNX_PRESENT, TF_PRESENT, TFLITE_PRESENT
27+
from basic_pitch import CT_PRESENT, ICASSP_2022_MODEL_PATH, ONNX_PRESENT, TF_PRESENT, TFLITE_PRESENT
2828

2929
try:
3030
import tensorflow as tf
@@ -413,7 +413,7 @@ def save_note_events(
413413

414414
def predict(
415415
audio_path: Union[pathlib.Path, str],
416-
model_or_model_path: Union[Model, pathlib.Path, str],
416+
model_or_model_path: Union[Model, pathlib.Path, str] = ICASSP_2022_MODEL_PATH,
417417
onset_threshold: float = 0.5,
418418
frame_threshold: float = 0.3,
419419
minimum_note_length: float = 127.70,

0 commit comments

Comments
 (0)