Bläddra i källkod

Fix inference UI Bug. (#201)

* Fix manage UI

* Optimize Workflow

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add pre-commit[bot] workflow

* Try to fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
spicysama 1 år sedan
förälder
incheckning
2e6f621860
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      tools/webui.py

+ 4 - 4
tools/webui.py

@@ -201,13 +201,13 @@ def inference_wrapper(
         )
         try:
             item = next(items)
-            if item and item[1]:
-                audios.append(
-                    gr.Audio(value=item[1], visible=True),
-                )
         except StopIteration:
             print("No more audio data available.")
 
+        audios.append(
+            gr.Audio(value=item[1] if (item and item[1]) else None, visible=True),
+        )
+
     for _ in range(n_audios - batch_infer_num):
         audios.append(
             gr.Audio(value=None, visible=False),