Question answering model based on a pre-trained BERT model
fine-tuned on Stanford Question Answering Dataset (SQuAD) 2.0
Here I built a BERT-based discord bot which returns an answer, given a user question and a passage, which includes the answer of the question.
Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable.
SQuAD 2.0 combines the 100,000 questions in SQuAD 1.1 with over 50,000 unanswerable questions written adversarially by crowdworkers to look similar to answerable ones. To do well on SQuAD 2.0, systems must not only answer questions when possible, but also determine when no answer is supported by the paragraph and abstain from answering. For more information regarding the SQuAD dataset and the current leaderboard, you can visit the following link.
You can download the pretrained bert model by clicking here then save it to the "/bertquestionanswering" folder.
- To use the bot, you need to have a discord bot account. You can follow any youtube video to create account.
- After that clone this repository and install all required dependencies.
- Move pretrained bert model to the "/bertquestionanswering" folder.
- Replace the token (line no. 9 in bot .py ) with your bot token.
- Run the bot by typing "python3 bot .py" in the terminal.
Click here to invite QABOT to your discord server