Skip to content

Lightweight REST API for Document-based Q&A powered by FAISS and OpenAI, enabling efficient PDF querying and intelligent answers

Notifications You must be signed in to change notification settings

williamtran29/document-qa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight REST API for Document-based Q&A powered by FAISS and OpenAI, enabling efficient PDF querying and intelligent answers

Follow these steps to run the project on your local machine using Conda.

Prerequisites

  • Conda installed on your machine.

Setup Instructions

  1. Clone the repository

    Please rename the env.example file to .env, then add your OpenAI key in the appropriate field.

    Important: If you want to enable text parsing from images within PDFs, please check the following branch: PDF OCR Branch.

  2. Create a new Conda environment:

    conda create --name document-qa python=3.12
    conda activate document-qa
  3. Install the required dependencies:

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

    python main.py
  5. API Documentation

    This section provides information on how to access the API documentation. To learn how to use the API, open the following URL in your web browser: http://localhost:8000/docs

Additional Notes

  • Replace document-qa with your preferred environment name.
  • Ensure requirements.txt is up to date with all necessary dependencies.
  • If the app doesn’t automatically create a vectorstore folder, please create it manually

That's it! Your project should now be running on your local machine.

About

Lightweight REST API for Document-based Q&A powered by FAISS and OpenAI, enabling efficient PDF querying and intelligent answers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages