Skip to content

Used FastAPI and React to make a full-stack web app that allows users to upload PDF documents and ask questions regarding the content of these.

Notifications You must be signed in to change notification settings

saksham-malhotra-27/FullStackAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Setup Instructions

Images

Backend Setup

  • Navigate to the Backend Directory:
cd backend
  • Install Required Packages:
pip install fastapi sqlalchemy alembic uvicorn sqlalchemy psycopg2-binary pymupdf pydantic llama_index.llms.gemini
  • Initialize alembic (make sure you are in backend directory) using:
alembic init alembic 
  • Add postgresql database url in alembic.ini under sqlalchemy.url name and in the file named database.py, Note that add url in alembic.ini without quotes
  • Also, copy / paste the content inside backend/env.py to backend/alembic/env.py and delete thr former file
  • Add google api key with google ai studio features enabled from https://aistudio.google.com/app/apikey
  • Run these commands (make sure in the backend dir)
alembic revision --autogenerate -m "Initial migration"  
alembic upgrade head
  • Make an uploads directory in the backend directory where alembic folder lies
  • Finally run the connection through :
uvicorn main:app --reload 

Note: To change the port number you have to configure the fronted's vite config file as well as the uvicorn port number in the main file under backend directory

Go to frontend directory :

  • Install Required Packages:
npm install
  • Run the app:
npm run dev

About

Used FastAPI and React to make a full-stack web app that allows users to upload PDF documents and ask questions regarding the content of these.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published