vinhkhuc / MemN2N-babi-python

End-To-End Memory Networks for bAbI question-answering tasks
Other
578 stars 145 forks source link

Demo breaks when I use custom test data #11

Open maoredman opened 7 years ago

maoredman commented 7 years ago

Hi, first of all, thanks for sharing your great work! I really love the web demo.

When I try and use my own .txt files for the web demo though, it doesn't seem to work, even if I abide by babI's formatting rules.

Below is my error stack:

[2017-11-19 17:50:59,797] ERROR in app: Exception on /get/story [GET] Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functionsrule.endpoint File "demo/web/webapp.py", line 47, in get_story question_idx, story_idx, last_sentence_idx) File "demo/qa.py", line 91, in get_story_texts for sent_idx in range(last_sentence_idx + 1)] KeyError: 175