#This is a Python application that allows you to load a Documet and ask questions about it using natural language.
- python
- Langchain
- OpenAI
- Pinecone
- Streamlit
- Reads pdf file from provided url
- Splits the text into smaller chunks that can be then fed into a LLM
- Create vector representations usingOpenAI embeddings
- Finds the chunks that are semantically similar to provided question
- Feeds those chunks to the LLM to generate a natural response
-
clone this repository and install the requirements:
-
pip install -r requirements.txt
-
Provided ENV variables following the example in env.example file
Run using streamlit run app.py
![Screenshot 2023-05-24 at 18 01 52](https://private-user-images.githubusercontent.com/19865565/240695192-3b53c68b-e969-4498-b246-d2a1068ff688.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk0MTUwMDcsIm5iZiI6MTcwOTQxNDcwNywicGF0aCI6Ii8xOTg2NTU2NS8yNDA2OTUxOTItM2I1M2M2OGItZTk2OS00NDk4LWIyNDYtZDJhMTA2OGZmNjg4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzAyVDIxMjUwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5YTA2MWExOWIyZDNhZjA5MTQyNTQzYzYwNDFjOTZlNWUxZGRlMDA5NTMyYmMyMmRhNzRlN2QxYjU4NTZkZWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PDcrIoHzYbIfDfZgF1DwQ-9BOX_bWjaFngdsQIq7KqI)