Add picture to GUI

This commit is contained in:
Piotr 2023-10-17 18:49:55 +02:00
parent 1b3ec830e1
commit 7f318bbb75
2 changed files with 12 additions and 8 deletions

BIN
house.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -10,35 +10,39 @@ window.config(padx=50, pady=50)
window.config(background="#ffffff")
window.title("Regresja")
canvas = Canvas(width=250, height=150, highlightthickness=0, background="#ffffff")
house = PhotoImage(file="house.png")
canvas.create_image(140,75, image=house)
canvas.grid(column=0, row=0, columnspan=2, padx=60)
tytul = Label()
tytul.config(text="Wycena wartości mieszkania na podstawie danych z serwisu otodom.pl", padx=70, pady=50, background="#ffffff")
tytul.grid(column=0, row=0, columnspan=2)
tytul.grid(column=0, row=1, columnspan=2)
metraz = Label()
metraz.config(text="Metraż", pady=20, background="#ffffff")
metraz.grid(column=0, row=1)
metraz.grid(column=0, row=2)
metraz_entry = Entry()
metraz_entry.grid(column=0, row=2)
metraz_entry.grid(column=0, row=3)
pietro_entry = Entry()
pietro_entry.grid(column=1, row=2)
pietro_entry.grid(column=1, row=3)
pietro = Label()
pietro.config(text="Piętro", pady=20, background="#ffffff")
pietro.grid(column=1, row=1)
pietro.grid(column=1, row=2)
przewidywania = Label()
przewidywania.config(text="Przewidywanie:", pady=20, padx=5, background="#ffffff")
przewidywania.grid(column=0, row=4, sticky='e')
przewidywania.grid(column=0, row=5, sticky='e')
wartosc_regresji = Label()
wartosc_regresji.config(text="Wartosć przewidywana", background="#ffffff")
wartosc_regresji.grid(column=1, row=4, sticky='w')
wartosc_regresji.grid(column=1, row=5, sticky='w')
model = pickle.load(open("model.pkl", 'rb'))
@ -64,7 +68,7 @@ def val_numbers():
start_button = Button(command=val_numbers)
start_button.config(text="Start", background="#000000", foreground="#ffffff")
start_button.grid(column=0, row=3, columnspan=2, sticky="s", pady=20)
start_button.grid(column=0, row=4, columnspan=2, sticky="s", pady=20)
window.mainloop()