PdfRAG / pages /welcome.py
Hisqkq
Refactor file upload and processing logic in chat.py
b415f81
import streamlit as st
st.title("Welcome to the Chatbot Application")
st.write("""
## About This Application πŸ’‘
Welcome to the Chatbot Application, an advanced AI-powered chat system designed to help you interact with documents more effectively. Here, you can upload a PDF file and ask questions about its content. Our chatbot leverages cutting-edge AI technology to provide accurate and insightful responses based on the information contained within your uploaded document.
### How It Works πŸ‘·
This application uses a technique called **Retrieval-Augmented Generation (RAG)**. Here's a brief overview of how it works:
1. **Upload Your File**: Start by uploading a document. The content of the input will be processed and transformed into a searchable format.
2. **Vector Store**: The text from the document is broken down into smaller segments (such as sentences or paragraphs) and encoded into vectors using a Sentence Transformer model. These vectors are stored in a vector database.
3. **Question Answering**: When you ask a question, the application searches the vector store to find the most relevant segments of the PDF. These segments provide context to the AI model, enabling it to generate accurate and contextually appropriate answers.
### Features πŸ“‹
- **Interactive Chat**: Engage in a conversation with the AI to get detailed answers about the content of your PDF.
- **Advanced Search**: The vector store allows for efficient and effective retrieval of relevant information from the document.
- **AI-Powered Responses**: The combination of retrieved context and AI generation ensures that the answers are both accurate and comprehensive.
- **New Input Formats**: In addition to PDFs, the application now supports various file types such as TXT, MD, DOCX, CSV, HTML, PPTX, and audio files (MP3, WAV).
We hope you find this application useful and enjoy exploring its capabilities. Use the sidebar to navigate to the chat page and start interacting with your documents in a whole new way.
""")