Thameur Portfolio

PDF Chat Application πŸ“š

June 15, 2024 (7mo ago)

πŸ’¬ A Streamlit-based web application that allows users to upload PDF documents and interact with them through a chat interface powered by Mistral AI. This application enables users to ask questions about their PDF documents and receive intelligent responses based on the document's content.

πŸ’» Source CodeΒ Β β€’Β  🌏 WebsiteΒ Β β€’Β 
PDF Chat Application: Interactive PDF Chat with AI
PDF Chat Application: Interactive PDF Chat with AI

πŸ“ Abstract

The PDF Chat Application allows users to upload PDF documents and interact with them using natural language. Powered by Mistral AI, it provides intelligent responses based on the content of the document, allowing users to query information from PDFs seamlessly.

🌟 Features

  • PDF Document Upload: Supports multiple PDF uploads for processing.
  • Interactive Chat Interface: Conversational design for user interaction.
  • Text Extraction & Chunking: Extracts and splits text for efficient processing.
  • Vector-based Document Search: Implements vector embeddings for fast and accurate searches.
  • Conversational Memory: Retains conversation context for meaningful interactions.
  • Real-time Question Answering: Provides instant answers based on PDF content.
  • User-Friendly Design: Clean and intuitive chat interface.

πŸš€ Getting Started

Prerequisites

  • Python 3.7+
  • Mistral AI API Key

Installation

  1. Clone the repository:
git clone https://github.com/verus56/pdf-chat-application.git cd pdf-chat-application
  1. Install dependencies:
pip install streamlit pypdf2 langchain langchain_mistralai
  1. Set up environment variables:

Create a .env file in the root directory and add your Mistral API key:

MISTRALAI_API_KEY=your_api_key_here

Running the App

streamlit run app.py

Visit http://localhost:8501 to access the application.

πŸ“– How It Works

  1. Upload your PDF document(s).
  2. Ask questions about the document in the chat interface.
  3. The AI processes the query and provides relevant answers based on the document's content.

πŸ› οΈ Technical Stack

  • Frontend: Streamlit
  • AI Engine: Mistral AI
  • PDF Processing: PyPDF2
  • Conversational AI: LangChain
  • Document Search: Vector Store
  • Custom Styling: HTML/CSS

πŸ› οΈ Deployment

  • Docker:

    docker build -t pdf-chat-app:latest . docker run -d -p 8501:8501 pdf-chat-app:latest
  • Cloud options: AWS, GCP, Azure

πŸ“ License

Released under the MIT License.

πŸ“² Contact

Made with ❀️ by V56