Giter Site home page Giter Site logo

rag-in-memory's Introduction

๐Ÿ“š RAG in Memory

Welcome to RAG in Memory! This application allows you to upload a PDF, create a FAISS-based search index, and get answers to specific questions related to the content of the PDF using the power of OpenAI's AI.

Features

  • Intuitive Interface: Uses a simple and intuitive Streamlit-based user interface.
  • PDF Upload: Upload a PDF from your local machine.
  • Text Extraction: Extract text from the uploaded PDF.
  • Create FAISS Index: Create a FAISS index from the extracted text chunks.
  • Semantic Search: Perform semantic searches within the PDF using OpenAI.

Prerequisites

  • Python 3.7 or higher
  • OpenAI key

Installation

  1. Clone the repository:

    git clone https://github.com/tuo-username/rag-in-memory.git
    cd rag-in-memory
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate # On Windows use `venv\Scripts\activate`
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Set your OpenAI API key:

    Open the .env file (create the file if it does not exist) and add your OpenAI API key:

    OPENAI_KEY=sk-your-api-key-here

How to Use It

  1. Start the Streamlit application:

    streamlit run app.py
  2. Upload a PDF via the user interface.

  3. After uploading the PDF, wait for the FAISS index to be created.

  4. Ask a question about the content of the PDF and get an immediate answer!

Examples of Use

Uploading PDF

Upload a PDF directly from the user interface. The PDF will be processed and the text will be extracted automatically.

Search and Answer

Enter a specific question regarding the content of the PDF and get an accurate answer by leveraging the power of OpenAI's language model.

Contribute

Contributions are welcome! If you have suggestions or improvements, feel free to open a pull request or create an issue.

License

This project is distributed under the MIT license. See the LICENSE file for more details.


We hope you find this application useful! If you have any questions or need support, please feel free to contact us.

rag-in-memory's People

Contributors

itsgaet avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.