Jon Taylor commited on
Commit
bfa8620
1 Parent(s): 5130316

fixed params buffer

Browse files
Files changed (1) hide show
  1. app/bot.py +3 -5
app/bot.py CHANGED
@@ -120,13 +120,12 @@ class DailyVision(EventHandler):
120
 
121
  if self.__params_buffer:
122
  print("New buffer params found")
123
- params = self.__pipeline.InputParams(self.__params_buffer)
124
  self.__params_buffer = None
125
-
126
  if not video_frame == None:
127
  image = Image.frombytes("RGB", (video_frame.width, video_frame.height), video_frame.buffer)
128
  result_image = self.__pipeline.predict(params, image)
129
- self.__camera.write_frame(result_image.tobytes())
130
  except queue.Empty:
131
  pass
132
 
@@ -140,8 +139,7 @@ class DailyVision(EventHandler):
140
 
141
  def on_app_message(self, message, sender):
142
  # Update pipeline settings based on message data
143
- self.__params_buffer = message
144
- # self.__params = self.__pipeline.InputParams(**message)
145
  return
146
 
147
  def wave(self):
 
120
 
121
  if self.__params_buffer:
122
  print("New buffer params found")
123
+ params = self.__params_buffer
124
  self.__params_buffer = None
 
125
  if not video_frame == None:
126
  image = Image.frombytes("RGB", (video_frame.width, video_frame.height), video_frame.buffer)
127
  result_image = self.__pipeline.predict(params, image)
128
+ #self.__camera.write_frame(result_image.tobytes())
129
  except queue.Empty:
130
  pass
131
 
 
139
 
140
  def on_app_message(self, message, sender):
141
  # Update pipeline settings based on message data
142
+ self.__params_buffer = self.__pipeline.InputParams(**message)
 
143
  return
144
 
145
  def wave(self):