mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
Concurrency count rephrase (#5151)
* Create Gradio_ONNX_on_Hugging_Face.md * add titles and related spaces * add clearer description * add gradio description * add contribution guide * add spaces description * add onnx models description * first version of document related to onnx/ort/modelzoo * rewording Signed-off-by: jcwchen <jacky82226@gmail.com> * for review Signed-off-by: jcwchen <jacky82226@gmail.com> * spaces Signed-off-by: jcwchen <jacky82226@gmail.com> * update Gradio desc * update spaces description * update onnx description * add code example * update title and tags * add Spaces demo * add efficientnet-lite4 description * add ONNX models tag description * updated by review; onnx.hub Signed-off-by: jcwchen <jacky82226@gmail.com> * download from onnx model zoo * guide on 4 kinds of interfaces * interfaces * changelog * added demo * added demos and edited markdown Added standard and unified interface demos, along with updates to the markdown. * updated notebooks Updated notebooks with markdown changes and bug fixes * Replaced blocks code with interface style code Updated the unified demo example with Interface style demo to keep in sync with other examples in the guide * added requirements.txt file requirements file with torch and transformers library * Update README.md (#5063) Fixing the link of building with blocks. * rephrasing the messaging for concurrency_count and queues * delete run.ipynb duplicate * delete duplicate * Delete run.py * rephrasing concurrency_count wording * Update gradio/blocks.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update gradio/blocks.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update gradio/blocks.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> --------- Signed-off-by: jcwchen <jacky82226@gmail.com> Co-authored-by: AK391 <81195143+AK391@users.noreply.github.com> Co-authored-by: Chun-Wei Chen <jacky82226@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: Esraa Abdelmaksoud <73304837+esraa-abdelmaksoud@users.noreply.github.com>
This commit is contained in:
parent
80be7a1ca4
commit
987725cf6a
@ -1625,7 +1625,7 @@ Received outputs:
|
||||
max_size: int | None = None,
|
||||
):
|
||||
"""
|
||||
You can control the rate of processed requests by creating a queue. This will allow you to set the number of requests to be processed at one time, and will let users know their position in the queue.
|
||||
By enabling the queue you can control the rate of processed requests, let users know their position in the queue, and set a limit on maximum number of events allowed.
|
||||
Parameters:
|
||||
concurrency_count: Number of worker threads that will be processing requests from the queue concurrently. Increasing this number will increase the rate at which requests are processed, but will also increase the memory usage of the queue.
|
||||
status_update_rate: If "auto", Queue will send status estimations to all clients whenever a job is finished. Otherwise Queue will send status at regular intervals set by this parameter as the number of seconds.
|
||||
@ -1637,11 +1637,11 @@ Received outputs:
|
||||
with gr.Blocks() as demo:
|
||||
button = gr.Button(label="Generate Image")
|
||||
button.click(fn=image_generator, inputs=gr.Textbox(), outputs=gr.Image())
|
||||
demo.queue(concurrency_count=3)
|
||||
demo.queue(max_size=10)
|
||||
demo.launch()
|
||||
Example: (Interface)
|
||||
demo = gr.Interface(image_generator, gr.Textbox(), gr.Image())
|
||||
demo.queue(concurrency_count=3)
|
||||
demo.queue(max_size=20)
|
||||
demo.launch()
|
||||
"""
|
||||
if default_enabled is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user