Pratyush101 commited on
Commit
c32c42e
·
verified ·
1 Parent(s): b07cf96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -249,7 +249,7 @@ if "output_text" not in st.session_state:
249
  st.session_state["output_text"] = ""
250
 
251
 
252
- # result_queue=queue.Queue()
253
  # def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
254
  # img = frame.to_ndarray(format="bgr24")
255
  # hands, img = detector.findHands(img, flipType=False)
@@ -275,6 +275,7 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
275
  hand = hands[0]
276
  bbox = hand["bbox"]
277
  cv2.rectangle(img, (bbox[0], bbox[1]), (255, 0, 0), 2)
 
278
 
279
  return av.VideoFrame.from_ndarray(img, format="bgr24")
280
 
 
249
  st.session_state["output_text"] = ""
250
 
251
 
252
+ result_queue=queue.Queue()
253
  # def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
254
  # img = frame.to_ndarray(format="bgr24")
255
  # hands, img = detector.findHands(img, flipType=False)
 
275
  hand = hands[0]
276
  bbox = hand["bbox"]
277
  cv2.rectangle(img, (bbox[0], bbox[1]), (255, 0, 0), 2)
278
+ result_queue.put(hands)
279
 
280
  return av.VideoFrame.from_ndarray(img, format="bgr24")
281