diff --git a/__pycache__/register.cpython-38.pyc b/__pycache__/register.cpython-38.pyc index 9f5562c..25c9fbf 100644 Binary files a/__pycache__/register.cpython-38.pyc and b/__pycache__/register.cpython-38.pyc differ diff --git a/register.py b/register.py index b0d2cf7..cb4f309 100644 --- a/register.py +++ b/register.py @@ -1,4 +1,4 @@ -from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QPushButton, QLineEdit, QLabel +from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QPushButton, QLineEdit, QLabel, QMessageBox from PyQt5.QtCore import Qt, QTimer from PyQt5.QtGui import QImage, QPixmap import os @@ -60,6 +60,13 @@ def register_face(self): if label: np.save(label + ".npy", embedding) + else: + msg = QMessageBox() + msg.setIcon(QMessageBox.Warning) + msg.setText("Error") + msg.setInformativeText('Please enter a name.') + msg.setWindowTitle("Error") + msg.exec_() self.name_edit.clear()