Moved ui from html to python