It serves as the entry point of the application, there are 4 endpoints in this project.
- /login
- /signup
- /credits
- /summarize
User data has been saved in Mongodb
For login purpose
To signup a user, on signup each user is awarded 3 credits so he is able to summarize 3 pdf documents for free
For pdf summarization we have used chatgpt-3.5-turbo model. It reads document thoroughly and then outputs a brief but concise summary.
For summarization user should first sign up and then login using the endpoint for login, then using the frontend user can easily summarize upto three pdf documents.
This endpoint is protected through JWT-Auth, so its only accessible to registered users
This enpoint is used to fetch the remaining credits of every user. Through the jwt it identifies a user and then fetch user credits. Each user is awarded 3 credits so he is able to summarize 3 pdf documents for free
Create a .env file in the root and follow .env.example to add all the environmental variables in it.
API_KEY
ANOTHER_API_KEY
-> You should have Mongodb Server installed in the system
To deploy this project run
pip install -r requirements.txt
uvicorn main:app --reload