changed run_flask.py to automatically detect machine