How to connect a progress bar to a function?,app.mainloop()