This Streamlit application uses the power of OpenAI and the Langchain library to provide conversational retrieval from uploaded PDF documents.
- Upload a PDF document for analysis.
- Query the uploaded document with a text-based question.
- Get a response based on the contents of the uploaded document.
The application uses the Langchain library to load and split the PDF document into chunks, generate embeddings of these chunks using OpenAI's API, and store these embeddings in a Chroma vector database. It then uses a Conversational Retrieval Chain from the Langchain library to answer queries based on the uploaded document.
- Run the Streamlit application.
- Upload a PDF document you want to query.
- Enter your question in the input field.
- Enter your OpenAI API key in the sidebar.
- Click 'Submit'.
- The answer to your question, based on the uploaded document, will be displayed.
- Python 3.6 or later
- Streamlit
- Langchain library
- OpenAI API key
pip install streamlit langchain openai
Note: This application requires an OpenAI API key, which you can get from the OpenAI platform.
This application requires the use of a private OpenAI API key. Please make sure you do not publicly share this key.
This tool does not guarantee 100% accuracy in its responses. Please verify the responses independently if necessary.