Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Transformer based chatbot based on "Attention is all you need"

License

Notifications You must be signed in to change notification settings

SrinithiSaiprasath/Transformer

Repository files navigation

PDF-Question-Answering Chatbot

Overview

This project is a transformer-based chatbot model that allows users to upload PDF documents, learn from the content, and answer questions based on the uploaded PDFs. Built on the principles of the "Attention is All You Need" model, this chatbot uses advanced attention mechanisms to create an interactive experience where users can derive meaningful insights from complex documents.

Features

  • PDF Upload & Parsing: Upload PDF documents, which the model efficiently parses and processes.
  • Contextual Learning: The model adapts to the content of the uploaded PDF, learning the context to provide accurate answers.
  • Interactive Question Answering: Users can ask questions directly related to the PDF content, and the chatbot provides relevant and insightful responses.
  • Advanced Attention Mechanisms: Leveraging self-attention and multihead attention for in-depth content understanding.
  • Positional Encoding: Ensures the model retains the sequential structure of the text within PDFs for context-aware answers.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/pdf-question-answering-chatbot.git
    cd pdf-question-answering-chatbot
  2. Set up a Conda environment:

    conda create -n pdf-qa-chatbot python=3.8
    conda activate pdf-qa-chatbot
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the application:

    streamlit run app.py

Usage

  1. Upload a PDF: Upload your PDF document through the user-friendly interface.
  2. Model Training: The model processes and learns from the uploaded content.
  3. Ask Questions: Interact with the chatbot by asking questions relevant to the PDF material.
  4. Receive Responses: Obtain answers derived from the PDF, contextualized by the model's understanding.
  5. Multi-PDF Learning: Expand the model's capabilities to handle multiple PDFs, allowing for cross-document queries.

Enhancement Ideas

  • Fine-tuning with Pre-Trained Models: Enhance the model's performance by integrating pre-trained transformer models.
  • User Authentication: Implement user authentication to allow multiple users to save and manage their PDF-based queries.
  • Response Prioritization: Introduce a response ranking system to prioritize the most relevant answers.
  • Continuous Learning: Enable the model to learn from user interactions, improving response accuracy over time.
  • Cloud Deployment: Consider deploying the model as a web service, making it accessible via API.

Contribution

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

License

This project is licensed under the Apache License - see the LICENSE file for details.