-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOverSpeed_Detection.py
43 lines (30 loc) · 1.07 KB
/
OverSpeed_Detection.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
import tkinter as tk
import os
def select_boundary():
os.system('python settings.py')
def launch_app():
os.system('python detection.py')
def save_video_name():
video_name = video_entry.get()
# You can use this video_name variable to load the video in detections.py or elsewhere
print("Video name saved as:", video_name)
with open('videoName.txt', 'w') as f:
f.write(f"{video_name}")
root = tk.Tk()
root.title("Vehicle Detection App")
# Create video name input label and entry box
video_label = tk.Label(root, text="Enter video name:")
video_label.pack()
video_entry = tk.Entry(root)
video_entry.pack()
# Create button to launch the settings.py file
boundary_button = tk.Button(
root, text="Select Boundary", command=select_boundary)
boundary_button.pack()
# Create button to launch the detections.py file
app_button = tk.Button(root, text="Launch App", command=launch_app)
app_button.pack()
# Create button to save the video name
save_button = tk.Button(root, text="Save Video Name", command=save_video_name)
save_button.pack()
root.mainloop()