Skip to content

Commit 8f556db

Browse files
committed
show error if dataset is empty
1 parent b71d595 commit 8f556db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/tabs/training.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ def train_index_only(
6161
recursive=recursive,
6262
)
6363

64+
if len(datasets) == 0:
65+
raise Exception("No audio files found")
66+
6467
yield "Preprocessing..."
6568
split.preprocess_audio(
6669
datasets,
@@ -159,6 +162,9 @@ def train_all(
159162
recursive=recursive,
160163
)
161164

165+
if len(datasets) == 0:
166+
raise Exception("No audio files found")
167+
162168
yield "Preprocessing..."
163169
split.preprocess_audio(
164170
datasets,

0 commit comments

Comments
 (0)