MaziyarPanahi
commited on
increase limit and close APIs
Browse files
app.py
CHANGED
@@ -176,7 +176,7 @@ with gr.Blocks() as demo:
|
|
176 |
# print(json_data['choices'][0])
|
177 |
|
178 |
msg.submit(
|
179 |
-
user, [msg, chatbot], [msg, chatbot], queue=
|
180 |
).then(
|
181 |
bot,
|
182 |
inputs=[
|
@@ -194,6 +194,6 @@ with gr.Blocks() as demo:
|
|
194 |
clear.click(lambda: None, None, chatbot, queue=False)
|
195 |
|
196 |
|
197 |
-
demo.queue()
|
198 |
if __name__ == "__main__":
|
199 |
demo.launch(show_api=False, share=False)
|
|
|
176 |
# print(json_data['choices'][0])
|
177 |
|
178 |
msg.submit(
|
179 |
+
user, [msg, chatbot], [msg, chatbot], queue=True, concurrency_limit=10
|
180 |
).then(
|
181 |
bot,
|
182 |
inputs=[
|
|
|
194 |
clear.click(lambda: None, None, chatbot, queue=False)
|
195 |
|
196 |
|
197 |
+
demo.queue(default_concurrency_limit=20, max_size=20, api_open=False)
|
198 |
if __name__ == "__main__":
|
199 |
demo.launch(show_api=False, share=False)
|