Vikas01 commited on
Commit
29d5352
1 Parent(s): 7b095b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -50,6 +50,7 @@ def test_connect():
50
 
51
  @socket.on("image")
52
  def receive_image(image):
 
53
  s = True
54
  while s :
55
 
@@ -95,7 +96,7 @@ def receive_image(image):
95
  face_locations = face_recognition.face_locations(rgb_small_frame)
96
  face_encodings = face_recognition.face_encodings(small_frame, face_locations)
97
  face_names = []
98
- # emit("result",{"name":"level2 " +str(cnt),"score":str(len(face_encodings))})
99
  cnt = cnt +1
100
  for face_encoding in face_encodings:
101
  # emit("result",{"name":"in for ","score":"34"})
@@ -111,7 +112,7 @@ def receive_image(image):
111
  break
112
 
113
  emit("result",{"name":str(name),"score":"myScore"})
114
- emit("result",{"name":"level1","score":"34"})
115
 
116
 
117
  # # for name in face_names:
 
50
 
51
  @socket.on("image")
52
  def receive_image(image):
53
+ global cnt
54
  s = True
55
  while s :
56
 
 
96
  face_locations = face_recognition.face_locations(rgb_small_frame)
97
  face_encodings = face_recognition.face_encodings(small_frame, face_locations)
98
  face_names = []
99
+ emit("result",{"name":"level2 " +str(cnt),"score":str(len(face_encodings))})
100
  cnt = cnt +1
101
  for face_encoding in face_encodings:
102
  # emit("result",{"name":"in for ","score":"34"})
 
112
  break
113
 
114
  emit("result",{"name":str(name),"score":"myScore"})
115
+
116
 
117
 
118
  # # for name in face_names: