-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUI.py
51 lines (31 loc) · 1.48 KB
/
GUI.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#import module from tkinter for UI
from tkinter import *
from playsound import playsound
import os
from datetime import datetime;
#creating instance of TK
root=Tk()
root.configure(background="white")
#root.geometry("300x300")
def function1():
os.system("py faces_from_Camera.py")
def function2():
os.system("py read_img.py")
os.system("py load_dataset.py")
os.system("py train_model.py")
def function3():
os.system("py Recognize_From_Camera.py")
def endapp():
root.destroy()
#stting title for the window
root.title("FACE RECOGNITION ATTENDANCE SYSTEM")
#creating a text label
Label(root, text="FACE RECOGNITION ATTENDANCE SYSTEM",font=("times new roman",20),fg="white",bg="maroon",height=2).grid(row=0,rowspan=2,columnspan=2,sticky=N+E+W+S,padx=5,pady=5)
#creating first button
Button(root,text="Create Dataset",font=("times new roman",20),bg="#0D47A1",fg='white',command=function1).grid(row=3,columnspan=2,sticky=W+E+N+S,padx=5,pady=5)
#creating second button
Button(root,text="Train Dataset",font=("times new roman",20),bg="#0D47A1",fg='white',command=function2).grid(row=4,columnspan=2,sticky=N+E+W+S,padx=5,pady=5)
#creating third button
Button(root,text="Recognize",font=('times new roman',20),bg="#0D47A1",fg="white",command=function3).grid(row=5,columnspan=2,sticky=N+E+W+S,padx=5,pady=5)
Button(root,text="Exit",font=('times new roman',20),bg="maroon",fg="white",command=endapp).grid(row=9,columnspan=2,sticky=N+E+W+S,padx=5,pady=5)
root.mainloop()