From 340a89f883386a3f0974850ce14e4fe07f2820b3 Mon Sep 17 00:00:00 2001 From: mrq Date: Fri, 10 Feb 2023 22:51:56 +0000 Subject: [PATCH] Numbering predicates on input_#.json files instead of "number of wavs" --- webui.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webui.py b/webui.py index a4a4666..20ec44c 100755 --- a/webui.py +++ b/webui.py @@ -144,18 +144,18 @@ def generate( idx = 0 for i, file in enumerate(os.listdir(outdir)): - if file[-4:] == ".wav": + if file[-5:] == ".json": idx = idx + 1 def get_name(line=0, candidate=0, combined=False): + if combined: + return f"{idx}_combined" + name = f"{idx}" if len(texts) > 1: name = f"{name}_{line}" if candidates > 1: name = f"{name}_{candidate}" - - if combined: - return f"{idx}_combined" return name for line, cut_text in enumerate(texts):