https://github.com/fractalego/bot_journal
A simple question answering bot
https://github.com/fractalego/bot_journal
chatbot question-answering
Last synced: 2 months ago
JSON representation
A simple question answering bot
- Host: GitHub
- URL: https://github.com/fractalego/bot_journal
- Owner: fractalego
- License: mit
- Created: 2021-07-28T16:14:39.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-08-21T14:39:05.000Z (almost 4 years ago)
- Last Synced: 2025-03-05T15:08:00.298Z (over 1 year ago)
- Topics: chatbot, question-answering
- Language: Jupyter Notebook
- Homepage:
- Size: 9.27 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
# Code related to the medium post "Building a Bot, Journal Entry #1"

The system presented here allows the user to upload a text document on the left side, wait a few seconds, and then ask questions about the text in a conversational manner. For now, the user can only upload a plain text file (no pdf, no word documents, nor HTML). The relevant paragraph of text appears on the right column.
This code follows the well-established Retriever/Reader paradigm to answer questions in a conversational form. The model is GPT2 fine-tuned on the CoQA dataset, both available as open-source projects.
## How to run the system
One can run the webserver by using the provided Dockerfile
```bash
$ sudo docker build . -t bot1
$ docker run -p 8010:8010 bot1
```
and then access the site at http://localhost:8010. It might take a few minutes to download all the packages and models.
## How to download a list of forbidden words
The bot looks into a list of words that would trigger an empty answer.
A convenient list can be downloaded as follows.
```bash
$ cd data
$ wget https://www.cs.cmu.edu/~biglou/resources/bad-words.txt
```
This repo has a placeholder empty list and can work without replacing it.