-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathgui.py
More file actions
30 lines (24 loc) · 749 Bytes
/
gui.py
File metadata and controls
30 lines (24 loc) · 749 Bytes
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
import tkinter as tk
from main import *
root = tk.Tk()
# width x height + x_offset + y_offset:
#root.geometry("512*300+30+30")
root.geometry("170x130+30+30")
def train_model():
pos=get_pos()
print("training!")
train(pos)
def test_model():
pos=get_pos()
print("testing!")
drive(pos)
# define and place button
train_btn = tk.Button(root, text='Train',
command=train_model)
train_btn.place(x = 20, y = 30, width=120, height=25)
test_btn = tk.Button(root, text='Test',
command=test_model)
test_btn.place(x = 20, y = 80, width=120, height=25)
#if dir data has no training data disable it else enable
#test_btn.config(state="disabled")
root.mainloop()