Modied run.py for web