Initialize Flask in window.py