Skip to content

Commit e5eefa7

Browse files
authored
use singlthread to do prediction (#7720)
1 parent 7640804 commit e5eefa7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llm/flask_server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ def streaming(data):
155155

156156
return app.response_class(stream_with_context(streaming(data)))
157157

158-
app.run(host="0.0.0.0", port=self.port)
158+
# set single thread to do prediction
159+
# refer to: https://github.com/pallets/flask/blob/main/src/flask/app.py#L605
160+
app.run(host="0.0.0.0", port=self.port, threaded=False)
159161

160162
def start_ui_service(self, args):
161163
# do not support start ui service in one command

0 commit comments

Comments
 (0)