This commit is contained in:
KKurylo 2023-10-17 18:08:44 +02:00
commit cdeece0a59

View File

@ -39,10 +39,14 @@ wartosc_regresji.grid(column=1, row=4, sticky='w')
def val_numbers():
max_metraz = 100000
max_piętro = 100
metraz = metraz_entry.get()
pietro = pietro_entry.get()
if metraz == "" or not metraz.isdigit() or pietro=="" or not pietro.isdigit():
messagebox.showinfo(title="Error", message=f"Please provide valid data")
elif int(metraz) < 0 or int(metraz) > max_metraz or int(pietro) < 0 or int(pietro) > max_piętro:
messagebox.showinfo(title="Error", message=f"Please provide numbers between 0 to 100 for floors and 0 to 100.000 for metric area.")
else:
confirm = messagebox.askyesno(title="Confirm", message="Do you want to start prediction?")