Spaces:
Running
Running
Adjust Concurency Limit
Browse files
app.py
CHANGED
@@ -361,14 +361,14 @@ with gr.Blocks(theme=theme, css_paths="styles.css") as demo:
|
|
361 |
lambda val, s: setattr(s, "throughput", val),
|
362 |
[throughput_control, convo_state],
|
363 |
None,
|
364 |
-
|
365 |
)
|
366 |
|
367 |
sync_threshold_slider.change(
|
368 |
lambda val, s: setattr(s, "sync_threshold", val),
|
369 |
[sync_threshold_slider, convo_state],
|
370 |
None,
|
371 |
-
|
372 |
)
|
373 |
|
374 |
def wrap_stream_generator(convo_state, dynamic_state, prompt, content):
|
@@ -383,23 +383,25 @@ with gr.Blocks(theme=theme, css_paths="styles.css") as demo:
|
|
383 |
[dynamic_state],
|
384 |
stateful_ui,
|
385 |
show_progress=False,
|
|
|
386 |
).then(
|
387 |
wrap_stream_generator,
|
388 |
[convo_state, dynamic_state, prompt_input, thought_editor],
|
389 |
[thought_editor, thought_editor, chatbot],
|
390 |
-
concurrency_limit=
|
391 |
).then(
|
392 |
lambda d: d.ui_state_controller(),
|
393 |
[dynamic_state],
|
394 |
stateful_ui,
|
395 |
show_progress=False,
|
|
|
396 |
)
|
397 |
|
398 |
next_turn_btn.click(
|
399 |
lambda d: d.reset_workspace(),
|
400 |
[dynamic_state],
|
401 |
stateful_ui + (thought_editor, prompt_input, chatbot),
|
402 |
-
|
403 |
)
|
404 |
|
405 |
lang_selector.change(
|
@@ -417,9 +419,9 @@ with gr.Blocks(theme=theme, css_paths="styles.css") as demo:
|
|
417 |
intro_md,
|
418 |
chatbot,
|
419 |
],
|
420 |
-
|
421 |
)
|
422 |
|
423 |
if __name__ == "__main__":
|
424 |
-
demo.queue(default_concurrency_limit=
|
425 |
demo.launch()
|
|
|
361 |
lambda val, s: setattr(s, "throughput", val),
|
362 |
[throughput_control, convo_state],
|
363 |
None,
|
364 |
+
concurrency_limit=None,
|
365 |
)
|
366 |
|
367 |
sync_threshold_slider.change(
|
368 |
lambda val, s: setattr(s, "sync_threshold", val),
|
369 |
[sync_threshold_slider, convo_state],
|
370 |
None,
|
371 |
+
concurrency_limit=None,
|
372 |
)
|
373 |
|
374 |
def wrap_stream_generator(convo_state, dynamic_state, prompt, content):
|
|
|
383 |
[dynamic_state],
|
384 |
stateful_ui,
|
385 |
show_progress=False,
|
386 |
+
concurrency_limit=None,
|
387 |
).then(
|
388 |
wrap_stream_generator,
|
389 |
[convo_state, dynamic_state, prompt_input, thought_editor],
|
390 |
[thought_editor, thought_editor, chatbot],
|
391 |
+
concurrency_limit=1000,
|
392 |
).then(
|
393 |
lambda d: d.ui_state_controller(),
|
394 |
[dynamic_state],
|
395 |
stateful_ui,
|
396 |
show_progress=False,
|
397 |
+
concurrency_limit=None
|
398 |
)
|
399 |
|
400 |
next_turn_btn.click(
|
401 |
lambda d: d.reset_workspace(),
|
402 |
[dynamic_state],
|
403 |
stateful_ui + (thought_editor, prompt_input, chatbot),
|
404 |
+
concurrency_limit=None,
|
405 |
)
|
406 |
|
407 |
lang_selector.change(
|
|
|
419 |
intro_md,
|
420 |
chatbot,
|
421 |
],
|
422 |
+
concurrency_limit=None,
|
423 |
)
|
424 |
|
425 |
if __name__ == "__main__":
|
426 |
+
demo.queue(default_concurrency_limit=1000)
|
427 |
demo.launch()
|