Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /gradio-app_gradio /scripts /load_test /gradio_app.py
| from time import sleep | |
| import gradio as gr | |
| version, _, _ = gr.__version__.split(".") | |
| with gr.Blocks() as demo: | |
| chatbot = gr.Chatbot() | |
| text = gr.Textbox() | |
| time = gr.Number(label="Time to Complete") | |
| def respond(text): | |
| output = ["Lorem"] * 500 | |
| for i in range(len(output) + 1): | |
| yield [[text, " ".join(output[:i])]] | |
| sleep(0.01) | |
| if version == "3": | |
| text.submit(respond, text, chatbot) | |
| else: | |
| text.submit(respond, text, chatbot, concurrency_limit=None) | |
| if __name__ == "__main__": | |
| if version == "3": | |
| demo.queue(concurrency_count=250).launch(max_threads=250) | |
| else: | |
| demo.launch(max_threads=250) | |
Xet Storage Details
- Size:
- 694 Bytes
- Xet hash:
- 8866009a7ab031a7e5c216cf22a8f3d656026a0d07efd35f82ef7fabb1a9330e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.