mzilinec / bi-att-flow

Bidirectional Attention Flow

Home Page:http://allenai.github.io/bi-att-flow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom version of BiDAF

Setup

  1. Install required Python packages and all.

  2. Download pre-trained model from this link and extract it in the root directory of the project. You will need to move the folders so that you have ./out/basic/...

  3. (Optional) Put additional contexts in the ./data/contexts directory. Each context should be a JSON file with a "text" key that contains the context. If you want to turn any mess into a one line string, use this website with the "Remove line breaks and paragraph breaks" option.

Usage

Run the web server.

python run-webserver.py

Send a POST request with the context and the question in the body as a JSON.

endpoint: http://host:port/question

example body:

{
    "context": "schmidhuber",
    "question": "Who is Jurgen Schmidhuber?"
}

Name of the context is the name of its JSON file without the .json suffix.

Run the webserver with a different port and address:

python run-webserver.py --address 1.1.1.1 --port 2000

About

Bidirectional Attention Flow

http://allenai.github.io/bi-att-flow

License:Apache License 2.0


Languages

Language:Python 74.9%Language:Jupyter Notebook 20.0%Language:HTML 2.6%Language:JavaScript 1.5%Language:Shell 1.0%