fix gradio version and add concurrency control

This commit is contained in:
wenmeng.zwm
2023-11-08 18:06:01 +08:00
parent 4937d9af68
commit aa58d79b77
2 changed files with 4 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ def generate_response(input, model_name):
return model(input)
except RuntimeError as e:
# if exception happens, print error in log and return empty str
print(e)
print('error', e)
return ''
@@ -143,4 +143,5 @@ with block as demo:
inputs=[message, state],
outputs=[challenge_result, chatbot, question_info, challenge_info])
demo.queue().launch(height=800, share=True)
demo.queue(concurrency_count=10).launch(
height=800, share=True, concurrency_limit=10)

View File

@@ -1,3 +1,3 @@
dashscope
gradio
gradio==3.39.0
sympy