Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,7 +94,8 @@ def run_generation_pipeline_client(
|
|
| 94 |
cfg_scale,
|
| 95 |
top_k,
|
| 96 |
temperature,
|
| 97 |
-
use_chained_longform
|
|
|
|
| 98 |
):
|
| 99 |
try:
|
| 100 |
# Handle audio prompt - save to temporary file if provided
|
|
@@ -131,6 +132,7 @@ def run_generation_pipeline_client(
|
|
| 131 |
top_k,
|
| 132 |
temperature,
|
| 133 |
use_chained_longform,
|
|
|
|
| 134 |
api_name="/run_generation_pipeline"
|
| 135 |
)
|
| 136 |
|
|
@@ -170,7 +172,8 @@ def run_duration_generation_pipeline_client(
|
|
| 170 |
use_chained_longform,
|
| 171 |
add_steps,
|
| 172 |
use_duration_aware,
|
| 173 |
-
chars_per_second
|
|
|
|
| 174 |
):
|
| 175 |
try:
|
| 176 |
# Handle audio prompt - save to temporary file if provided
|
|
@@ -210,6 +213,7 @@ def run_duration_generation_pipeline_client(
|
|
| 210 |
add_steps,
|
| 211 |
use_duration_aware,
|
| 212 |
chars_per_second,
|
|
|
|
| 213 |
api_name="/run_duration_generation_pipeline"
|
| 214 |
)
|
| 215 |
|
|
@@ -291,6 +295,13 @@ with gr.Blocks(theme="Respair/Shiki@9.1.0", css=css) as demo:
|
|
| 291 |
value=0.7,
|
| 292 |
step=0.1
|
| 293 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
chained_longform_checkbox = gr.Checkbox(
|
| 295 |
label="Use Chained Longform (Sequential conditioning for consistency)",
|
| 296 |
value=False
|
|
@@ -331,7 +342,8 @@ with gr.Blocks(theme="Respair/Shiki@9.1.0", css=css) as demo:
|
|
| 331 |
cfg_scale_slider,
|
| 332 |
top_k_slider,
|
| 333 |
temperature_slider,
|
| 334 |
-
chained_longform_checkbox
|
|
|
|
| 335 |
],
|
| 336 |
outputs=[audio_output, status_output],
|
| 337 |
concurrency_limit=4 # Limit concurrent requests
|
|
@@ -385,6 +397,13 @@ with gr.Blocks(theme="Respair/Shiki@9.1.0", css=css) as demo:
|
|
| 385 |
value=0.7,
|
| 386 |
step=0.1
|
| 387 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
|
| 389 |
# Duration-specific parameters
|
| 390 |
gr.Markdown("### Duration Control Parameters")
|
|
@@ -453,7 +472,8 @@ with gr.Blocks(theme="Respair/Shiki@9.1.0", css=css) as demo:
|
|
| 453 |
chained_longform_checkbox_dur,
|
| 454 |
add_steps_slider,
|
| 455 |
use_duration_aware_checkbox,
|
| 456 |
-
chars_per_second_slider
|
|
|
|
| 457 |
],
|
| 458 |
outputs=[audio_output_dur, status_output_dur],
|
| 459 |
concurrency_limit=4 # Limit concurrent requests
|
|
|
|
| 94 |
cfg_scale,
|
| 95 |
top_k,
|
| 96 |
temperature,
|
| 97 |
+
use_chained_longform,
|
| 98 |
+
seed # Add seed parameter
|
| 99 |
):
|
| 100 |
try:
|
| 101 |
# Handle audio prompt - save to temporary file if provided
|
|
|
|
| 132 |
top_k,
|
| 133 |
temperature,
|
| 134 |
use_chained_longform,
|
| 135 |
+
seed, # Add seed to API call
|
| 136 |
api_name="/run_generation_pipeline"
|
| 137 |
)
|
| 138 |
|
|
|
|
| 172 |
use_chained_longform,
|
| 173 |
add_steps,
|
| 174 |
use_duration_aware,
|
| 175 |
+
chars_per_second,
|
| 176 |
+
seed # Add seed parameter
|
| 177 |
):
|
| 178 |
try:
|
| 179 |
# Handle audio prompt - save to temporary file if provided
|
|
|
|
| 213 |
add_steps,
|
| 214 |
use_duration_aware,
|
| 215 |
chars_per_second,
|
| 216 |
+
seed, # Add seed to API call
|
| 217 |
api_name="/run_duration_generation_pipeline"
|
| 218 |
)
|
| 219 |
|
|
|
|
| 295 |
value=0.7,
|
| 296 |
step=0.1
|
| 297 |
)
|
| 298 |
+
seed_slider = gr.Slider(
|
| 299 |
+
label="Seed (use -1 for random)",
|
| 300 |
+
minimum=-1,
|
| 301 |
+
maximum=2147483647,
|
| 302 |
+
value=-1,
|
| 303 |
+
step=1
|
| 304 |
+
)
|
| 305 |
chained_longform_checkbox = gr.Checkbox(
|
| 306 |
label="Use Chained Longform (Sequential conditioning for consistency)",
|
| 307 |
value=False
|
|
|
|
| 342 |
cfg_scale_slider,
|
| 343 |
top_k_slider,
|
| 344 |
temperature_slider,
|
| 345 |
+
chained_longform_checkbox,
|
| 346 |
+
seed_slider # Add seed slider to inputs
|
| 347 |
],
|
| 348 |
outputs=[audio_output, status_output],
|
| 349 |
concurrency_limit=4 # Limit concurrent requests
|
|
|
|
| 397 |
value=0.7,
|
| 398 |
step=0.1
|
| 399 |
)
|
| 400 |
+
seed_slider_dur = gr.Slider(
|
| 401 |
+
label="Seed (use -1 for random)",
|
| 402 |
+
minimum=-1,
|
| 403 |
+
maximum=2147483647,
|
| 404 |
+
value=-1,
|
| 405 |
+
step=1
|
| 406 |
+
)
|
| 407 |
|
| 408 |
# Duration-specific parameters
|
| 409 |
gr.Markdown("### Duration Control Parameters")
|
|
|
|
| 472 |
chained_longform_checkbox_dur,
|
| 473 |
add_steps_slider,
|
| 474 |
use_duration_aware_checkbox,
|
| 475 |
+
chars_per_second_slider,
|
| 476 |
+
seed_slider_dur # Add seed slider to inputs
|
| 477 |
],
|
| 478 |
outputs=[audio_output_dur, status_output_dur],
|
| 479 |
concurrency_limit=4 # Limit concurrent requests
|