Spaces:
Sleeping
Sleeping
update duration params
Browse files
gradio_components/prediction.py
CHANGED
@@ -40,6 +40,7 @@ def _do_predictions(
|
|
40 |
)
|
41 |
be = time.time()
|
42 |
processed_melodies = []
|
|
|
43 |
for melody in melodies:
|
44 |
if melody is None:
|
45 |
processed_melodies.append(None)
|
@@ -138,7 +139,7 @@ def predict(
|
|
138 |
if INTERRUPTING:
|
139 |
raise gr.Error("Interrupted.")
|
140 |
|
141 |
-
model.set_custom_progress_callback(_progress
|
142 |
|
143 |
wavs = _do_predictions(
|
144 |
model_path,
|
|
|
40 |
)
|
41 |
be = time.time()
|
42 |
processed_melodies = []
|
43 |
+
model.set_generation_params(duration=duration)
|
44 |
for melody in melodies:
|
45 |
if melody is None:
|
46 |
processed_melodies.append(None)
|
|
|
139 |
if INTERRUPTING:
|
140 |
raise gr.Error("Interrupted.")
|
141 |
|
142 |
+
model.set_custom_progress_callback(_progress
|
143 |
|
144 |
wavs = _do_predictions(
|
145 |
model_path,
|