Summary
In this code pattern, learn how to build a chatbot that answers a user’s questions by finding the answer in a college biology textbook.
Description
Ever found yourself wondering what mitochondria are? Perhaps you are curious about how neurons communicate with each other? A Google search works well to answer your questions, but what about something still digestible, but more precise? This code pattern shows you how to build a chatbot that answers a user’s questions by finding the answer in a college biology textbook. In the pattern, the textbook used is Biology 2e by Mary Ann Clark, Matthew Douglas, and Jung Choi.
The web app uses the Model Asset eXchange (MAX) Question Answering Model (hosted on the Machine Learning eXchange) to answer questions that are typed in by the user. The web application provides a chat-like interface that lets users type in questions, which are then sent to a Flask Python server. The back end sends the question and related body of text from the textbook to a REST endpoint exposed by the MAX model, which returns an answer to the question, displayed as a response from the chatbot. The model’s REST endpoint is set up using the Docker image provided on MAX.
When you have completed this code pattern, you understand how to:
Build a Docker image of the Question Answering model
Deploy a deep learning model with a REST endpoint
Generate answers to questions using the model’s REST API
Run a web application that using the model’s REST API
Flow
Instructions
Find the detailed steps for this pattern in the README file. The steps show you how to:
Deploy the model.
Build the web app.
Clone the repository.
Install the dependencies.
Start the server.