Edit model card
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Question Answering Bot

Overview

This project implements a Question Answering Bot using a pre-trained BERT model fine-tuned on the SQuAD (Stanford Question Answering Dataset) dataset. The bot is capable of taking a context and a question as input and returning the corresponding answer. The project also includes a Gradio interface, allowing users to interact with the model through a user-friendly web application.

Model

The model used in this project is based on BERT (Bidirectional Encoder Representations from Transformers), a state-of-the-art NLP model. Specifically, we use the "Graphcore/bert-large-uncased" variant, optimized for question answering tasks.

Task

The primary task of this bot is to answer questions based on a given context. Users can provide the context by either manually entering it or by uploading a text file. The Gradio interface allows for easy interaction with the model, including options to remember the context for subsequent questions and clear it when needed.

Dataset

The model was fine-tuned using the SQuAD dataset, which is a collection of questions and answers based on Wikipedia articles. This dataset provides a rigorous benchmark for evaluating the model's question-answering abilities.

Usage

To run the Question Answering Bot, you need to have the required libraries installed, including Gradio and Transformers.

Running the Gradio App

You can find the Gradio app code in the file gradio_app.py. To launch the app, simply run: $ python gradio_app.py

Using the Notebook

The complete code, including model training and Gradio app, is available in the Jupyter Notebook QuestionAnsweringBot.ipynb. You can run it using Jupyter to explore and modify the code as needed. NOTE: It is recommended to run this notebook on paperspace.com for no errors as when i ran this on google colab it was showing some import errors which I was unable to resolve.

Conclusion

This project demonstrates a practical application of deep learning in natural language processing by building an interactive question-answering bot. It showcases the power of transfer learning and provides an accessible way for users to engage with complex models.

Major Challange

The major challange I faced during this project was the implementation of IPU as it was pretty complex and I was unable to run it on either my laptop or on google colab ans i had to take a lot of help from google and chat gpt but after finally implementing it I feel great and have a sense of accomplishment.

Downloads last month
13