-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.py
More file actions
89 lines (68 loc) · 3.46 KB
/
Copy pathgui.py
File metadata and controls
89 lines (68 loc) · 3.46 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import tkinter as tk
from api import DNNTest
from pages.network_analysis import NetworkAnalysisPage
from pages.image_mutation import ImageMutationPage
from pages.image_detection import ImageDetectionPage
from pages.model_training import ModelTrainingPage
from pages.model_evaluation import ModelEvaluationPage
from pages.model_repairing import ModelRepairingPage
dnnTest = DNNTest("DNNTesting")
class AutoTestUnreliableInferenceGUI:
def __init__(self, master):
self.master = master
master.title("AutoTestUnreliableInference")
self.master.geometry("600x400")
self.network_analysis_page = None
self.image_mutation_page = None
self.image_detection_page = None
self.model_training_page = None
self.model_evaluation_page = None
self.model_repairing_page = None
button_frame = tk.Frame(self.master)
button_frame.pack()
# Creating the buttons on the main page
self.model_train_button = tk.Button(button_frame, text="Model Training", command=self.show_model_training_page)
self.model_train_button.pack()
self.image_detection_button = tk.Button(button_frame, text="Image Detection",
command=self.show_image_detection_page)
self.image_detection_button.pack()
self.image_mutation_button = tk.Button(button_frame, text="Image Mutation",
command=self.show_image_mutation_page)
self.image_mutation_button.pack()
self.model_evaluation_button = tk.Button(button_frame, text="Model Evaluation",
command=self.show_model_evaluation_page)
self.model_evaluation_button.pack()
self.model_repair_button = tk.Button(button_frame, text="Model Repairing",
command=self.show_model_repairing_page)
self.model_repair_button.pack()
self.network_analysis_button = tk.Button(button_frame, text="Network Analysis",
command=self.show_network_analysis_page)
self.network_analysis_button.pack()
# Add more buttons here for your other pages...
def show_network_analysis_page(self):
self.network_analysis_page = NetworkAnalysisPage(self.master)
self.network_analysis_page.tkraise()
def show_image_mutation_page(self):
self.image_mutation_page = ImageMutationPage(self.master)
self.image_mutation_page.tkraise()
def show_image_detection_page(self):
self.image_detection_page = ImageDetectionPage(self.master)
self.image_detection_page.tkraise()
def show_model_training_page(self):
self.model_training_page = ModelTrainingPage(self.master)
self.model_training_page.tkraise()
def show_model_evaluation_page(self):
self.model_evaluation_page = ModelEvaluationPage(self.master)
self.model_evaluation_page.tkraise()
def show_model_repairing_page(self):
self.model_repairing_page = ModelRepairingPage(self.master)
self.model_repairing_page.tkraise()
def run_gui():
root = tk.Tk()
gui = AutoTestUnreliableInferenceGUI(root)
# AutoTestUnreliableInferenceGUI(root).show_model_training_page()
# AutoTestUnreliableInferenceGUI(root).show_model_evaluation_page()
# AutoTestUnreliableInferenceGUI(root).show_image_mutation_page()
root.mainloop()
if __name__ == "__main__":
run_gui()