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.
- Conda installed on your machine.
-
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.
-
Create a new Conda environment:
conda create --name document-qa python=3.12 conda activate document-qa
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the project:
python main.py
-
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
- 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.