At the least you should start Flask as a background process. Look into the
nohup flask run &
This will enable you to start the server, and terminate your SSH session. However, running production services in an IaaS cloud usually involves more work (configuring images or start up scripts, setting up monitoring, setting up redundancy etc). See Compute Engine documentation for a full overview. Depending on your scenario Google App Engine (PaaS) may be a better fit for you, as it takes care of some of this complexity.