Khushi Dahiya
commited on
Commit
·
6bc3ca2
1
Parent(s):
3cfeaa8
increasing request concurrency
Browse files- README.md +1 -1
- demos/melodyflow_app.py +4 -4
README.md
CHANGED
|
@@ -5,7 +5,7 @@ tags:
|
|
| 5 |
- music generation
|
| 6 |
- music editing
|
| 7 |
- flow matching
|
| 8 |
-
app_file: demos/
|
| 9 |
emoji: 🎵
|
| 10 |
colorFrom: gray
|
| 11 |
colorTo: blue
|
|
|
|
| 5 |
- music generation
|
| 6 |
- music editing
|
| 7 |
- flow matching
|
| 8 |
+
app_file: demos/melodyflow_app.py
|
| 9 |
emoji: 🎵
|
| 10 |
colorFrom: gray
|
| 11 |
colorTo: blue
|
demos/melodyflow_app.py
CHANGED
|
@@ -538,7 +538,7 @@ def ui_local(launch_kwargs):
|
|
| 538 |
melody,
|
| 539 |
model_path,],
|
| 540 |
outputs=audio_outputs,
|
| 541 |
-
concurrency_limit=
|
| 542 |
melody.change(toggle_melody, melody, [solver])
|
| 543 |
solver.change(toggle_solver, [solver, melody], [steps, target_flowstep,
|
| 544 |
regularize, regularization_strength, duration])
|
|
@@ -603,7 +603,7 @@ def ui_local(launch_kwargs):
|
|
| 603 |
interface.queue(
|
| 604 |
max_size=50, # Queue up to 50 requests
|
| 605 |
api_open=True # Enable API access
|
| 606 |
-
).launch(max_threads=
|
| 607 |
|
| 608 |
def ui_hf(launch_kwargs):
|
| 609 |
with gr.Blocks() as interface:
|
|
@@ -660,7 +660,7 @@ def ui_hf(launch_kwargs):
|
|
| 660 |
duration,
|
| 661 |
melody,],
|
| 662 |
outputs=audio_outputs,
|
| 663 |
-
concurrency_limit=
|
| 664 |
melody.change(toggle_melody, melody, [solver])
|
| 665 |
solver.change(toggle_solver, [solver, melody], [steps, target_flowstep,
|
| 666 |
regularize, regularization_strength, duration])
|
|
@@ -724,7 +724,7 @@ def ui_hf(launch_kwargs):
|
|
| 724 |
interface.queue(
|
| 725 |
max_size=50, # Queue up to 50 requests
|
| 726 |
api_open=True # Enable API access
|
| 727 |
-
).launch(max_threads=
|
| 728 |
|
| 729 |
|
| 730 |
def cleanup():
|
|
|
|
| 538 |
melody,
|
| 539 |
model_path,],
|
| 540 |
outputs=audio_outputs,
|
| 541 |
+
concurrency_limit=20) # Set concurrency limit on the event listener
|
| 542 |
melody.change(toggle_melody, melody, [solver])
|
| 543 |
solver.change(toggle_solver, [solver, melody], [steps, target_flowstep,
|
| 544 |
regularize, regularization_strength, duration])
|
|
|
|
| 603 |
interface.queue(
|
| 604 |
max_size=50, # Queue up to 50 requests
|
| 605 |
api_open=True # Enable API access
|
| 606 |
+
).launch(max_threads=40, **launch_kwargs) # Configure worker threads in launch()
|
| 607 |
|
| 608 |
def ui_hf(launch_kwargs):
|
| 609 |
with gr.Blocks() as interface:
|
|
|
|
| 660 |
duration,
|
| 661 |
melody,],
|
| 662 |
outputs=audio_outputs,
|
| 663 |
+
concurrency_limit=20) # Set concurrency limit on the event listener
|
| 664 |
melody.change(toggle_melody, melody, [solver])
|
| 665 |
solver.change(toggle_solver, [solver, melody], [steps, target_flowstep,
|
| 666 |
regularize, regularization_strength, duration])
|
|
|
|
| 724 |
interface.queue(
|
| 725 |
max_size=50, # Queue up to 50 requests
|
| 726 |
api_open=True # Enable API access
|
| 727 |
+
).launch(max_threads=40, **launch_kwargs) # Configure worker threads in launch()
|
| 728 |
|
| 729 |
|
| 730 |
def cleanup():
|