- Frontend: React.js
- Backend: FastAPI
- Database: SQLite
- Tools: SQLAlchemy, CORS middleware, axios, python-multipart, PyMuPDF
- NLP: langchain
- LLM Model: OpenAI
cd frontend/
npm install
npm run dev
- Create a virtual environment for the python code in FastAPI application:
py -m venv env // creates a virtual environment for the project
- Activate virtual environment
env/Scripts/activate // we can use any name instead of env
- Install dependencies
pip install -r requirements.txt // installs all the dependencies mentioned in the requirements.txt file
- To start the FastAPI application
cd backend/
uvicorn main:app --reload
The Ask Me Anything app allows users to upload PDF and then ask questions based on it. The application processes the text of the uploaded PDF and then outputs an answer to the asked question.
- Add a config.js file in the frontend directory that contains the backend URL as:
export const BASE_URL = "http://localhost:8000";
- Add the OpenAI API key in the .env file in the backend directory to use the OpenAI llm model.
export OPENAI_API_KEY="xxxx"
- Get the OpenAI API key from: https://platform.openai.com/api-keys