Graduate

Make client GUI

...@@ -144,6 +144,7 @@ class Register(tk.Frame): ...@@ -144,6 +144,7 @@ class Register(tk.Frame):
144 self.log.insert(tkinter.CURRENT, '\n') 144 self.log.insert(tkinter.CURRENT, '\n')
145 else: 145 else:
146 self.log.insert(tkinter.CURRENT, 'verification failed:' + data['status']) 146 self.log.insert(tkinter.CURRENT, 'verification failed:' + data['status'])
147 + self.log.insert(tkinter.CURRENT, '\n')
147 if data['status'] == 'failed': 148 if data['status'] == 'failed':
148 send = json.dumps({'action': 'save_image', 'image': image.tolist()}) 149 send = json.dumps({'action': 'save_image', 'image': image.tolist()})
149 except Exception as e: 150 except Exception as e:
......
...@@ -195,7 +195,7 @@ class Register(tk.Frame): ...@@ -195,7 +195,7 @@ class Register(tk.Frame):
195 async with websockets.connect(self.uri) as websocket: 195 async with websockets.connect(self.uri) as websocket:
196 for face, image in zip(self.face_list, self.image_list): 196 for face, image in zip(self.face_list, self.image_list):
197 #type: np.float32 197 #type: np.float32
198 - send = json.dumps({'action': 'register', 'student_id':self.studentID, 'student_name':self.studentName, 'MTCNN': face.tolist()}) 198 + send = json.dumps({'action': 'register', 'student_id':self.studentID.get(), 'student_name':self.studentName.get(), 'MTCNN': face.tolist()})
199 await websocket.send(send) 199 await websocket.send(send)
200 recv = await websocket.recv() 200 recv = await websocket.recv()
201 data = json.loads(recv) 201 data = json.loads(recv)
......