vinhkhuc/MemN2N-babi-python

Demo does not work

chrisspen opened this issue · 1 comments

Running the demo with python -m demo.qa seems to correctly launch the Flask web server, but the demo itself doesn't actually do anything. The page renders, and the "Get new story" button cycles through random stories, but the "Predict answer" button does nothing, and no memory or answers are ever shown.

This is what I see when I view the web app.

The console shows these errors:

Traceback (most recent call last):
  File "~/git/MemN2N-babi-python/.env/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "~/git/MemN2N-babi-python/.env/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "~/git/MemN2N-babi-python/.env/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "~/git/MemN2N-babi-python/.env/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "~/git/MemN2N-babi-python/.env/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "demo/web/webapp.py", line 65, in get_answer
    story_idx         = test_questions[0, question_idx]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

Hi chrisspen,
This issue has been fixed in the latest commit. Could you check it again?

Thanks