updated model.py and index.html