Graduate

Make client GUI

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