Olivier-Truong commited on
Commit
f74ed50
1 Parent(s): 148d7c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -158,9 +158,9 @@ def upload_img():
158
 
159
  @sock.route('/pred')
160
  def echo(ws):
161
- while True:
162
- data = ws.receive()
163
- ws.send(data)
164
 
165
  @socketio.on('message')
166
  def handle_message(message):
 
158
 
159
  @sock.route('/pred')
160
  def echo(ws):
161
+ data = ws.receive()
162
+ ws.send(data)
163
+ return ""
164
 
165
  @socketio.on('message')
166
  def handle_message(message):