Kaushik066 commited on
Commit
66eaeb0
·
verified ·
1 Parent(s): 4c8602a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -218,7 +218,7 @@ app.prepare(ctx_id=-1, det_size=(IMAGE_SHAPE, IMAGE_SHAPE)) # Use ctx_id=-1 if
218
  def prod_function(app, prod_path, webcam_path):
219
  webcam_img = Image.open(webcam_path)
220
  np_webcam = np.array(webcam_img) # Convert to NumPy array
221
- cv2_webcam = cv2.cvtColor(np_image, cv2.COLOR_RGB2BGR) # Convert RGB (PIL) to BGR (OpenCV)
222
 
223
  webcam_emb = app.get(cv2_webcam, max_num=1)
224
  webcam_emb = webcam_emb[0].embedding
 
218
  def prod_function(app, prod_path, webcam_path):
219
  webcam_img = Image.open(webcam_path)
220
  np_webcam = np.array(webcam_img) # Convert to NumPy array
221
+ cv2_webcam = cv2.cvtColor(np_webcam, cv2.COLOR_RGB2BGR) # Convert RGB (PIL) to BGR (OpenCV)
222
 
223
  webcam_emb = app.get(cv2_webcam, max_num=1)
224
  webcam_emb = webcam_emb[0].embedding