PDF to Trends is a Streamlit web application that enables users to upload PDF files and perform queries on their content. It utilizes the Langchain library for question-answering and OpenAI embeddings for text similarity search.
- Upload PDF files
- Perform queries on the content of PDF files
- Utilize Langchain for question-answering
- Use OpenAI embeddings for text similarity search
To run PDF to Trends locally, follow these steps:
- Clone this repository to your local machine.
- Install the required dependencies by running
pip install -r requirements.txt
. - Set up your OpenAI API key by adding it to the environment variable
OPENAI_API_KEY
. - Run the Streamlit app by executing
streamlit run pdf-to-trends.py
. - Access the app in your web browser at
http://localhost:8501
.
- Upload PDF files by clicking on the "Upload PDF file" button.
- Enter your query in the text input field provided.
- Click on the "Search" button to perform the query on the uploaded PDF file.
- View the responses provided by the app.
- Python 3.x
- Streamlit
- pypdf
- langchain
- langchain_openai
Install the dependencies using pip install -r requirements.txt
.
Contributions are welcome! If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request.
This project is licensed under the MIT License.