Skip to content

Commit 0a09007

Browse files
Add files via upload
1 parent 6496a5b commit 0a09007

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

GUI_Codes/Segmentation_GUI.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from Tkinter import *
2+
import tkMessageBox
3+
import tkFileDialog
4+
import os
5+
import glob
6+
import tkFont
7+
top = Tk()
8+
9+
### when button clicks,it selects the file
10+
def helloCallBack():
11+
file_path_string = tkFileDialog.askopenfilename() #stores the file path in a variable
12+
os.system("python3 main.py "+str(file_path_string) ) #passes the file path(img path) through command line argument
13+
14+
var = StringVar()
15+
label = Label( top, textvariable=var, relief=RAISED,bg= "green" ,width = "100",height = "20",borderwidth= "20",fg= "pink")
16+
17+
mb= Menubutton ( top, text="menu", relief=RAISED,padx=3 )
18+
19+
var.set("Machine Learning Term Project \n\n GUI For Image Segmantation \n\n Team - Eagle I")
20+
21+
B = Button(top, text ="Select the image u want to Segment from Ur directory", command = helloCallBack,bg ="yellow",width = "50",height = "2",borderwidth= "20",fg = "blue",activebackground = "blue",activeforeground = "black")
22+
mb.pack()
23+
label.pack()
24+
B.pack()
25+
top.mainloop()

0 commit comments

Comments
 (0)