Fixing up index.py to serve classifier API