![](https://private-user-images.githubusercontent.com/113531303/373868228-d2d8f374-9e91-4b97-9565-043986c98083.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTIwMTUsIm5iZiI6MTczOTIxMTcxNSwicGF0aCI6Ii8xMTM1MzEzMDMvMzczODY4MjI4LWQyZDhmMzc0LTllOTEtNGI5Ny05NTY1LTA0Mzk4NmM5ODA4My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxODIxNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZDEzN2EzMTM0ZWNhOWNhOGFmZDJhNTEzYWNkODZjZTA5ZjZlYzkxY2Y0ODc5ZjQ4YzBhNWVhNzIyZmQzNjc4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.o0MPe9UKLcB5ZC0U2pxpNiBQkb_-QzsLR_WBHVNvAiE)
Talk2PDFs is a web application that lets users interact with PDF documents through a chatbot. Users can upload PDFs or provide URLs, and the chatbot will use the extracted content to answer questions.
![](https://private-user-images.githubusercontent.com/113531303/373868482-25a87d8f-2dac-4b35-95fd-c1cbb9b1f77a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTIwMTUsIm5iZiI6MTczOTIxMTcxNSwicGF0aCI6Ii8xMTM1MzEzMDMvMzczODY4NDgyLTI1YTg3ZDhmLTJkYWMtNGIzNS05NWZkLWMxY2JiOWIxZjc3YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxODIxNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03YTZhOTU1YzRhYTExZTZiOTViYTQxZDE2YjQzOTczNWZkMTJkNDdiMzNiN2IxNTdlNmZjZDg4MjRiN2JmMmE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.wTo_GIqFF1l7PFsPS7-2YXvVND9Gqjy3mi-8srgPIhM)
-
Python
-
Streamlit - For the web interface.
-
Ollama - Using the
llama3.2
model for language processing. -
Visual Studio Build Tools - Required for compiling dependencies like ChromaDB.
- Download and install Visual Studio Build Tools.
- During installation, make sure to select the C++ build tools workload.
- After installation, use pip to install ChromaDB
![](https://private-user-images.githubusercontent.com/113531303/373868512-afd6a98b-3918-4c87-9c45-cd9e03d37796.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTIwMTUsIm5iZiI6MTczOTIxMTcxNSwicGF0aCI6Ii8xMTM1MzEzMDMvMzczODY4NTEyLWFmZDZhOThiLTM5MTgtNGM4Ny05YzQ1LWNkOWUwM2QzNzc5Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxODIxNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNmVkNzVkNmRjOTNjOGU5MTY5NDNhYzBmOTgxM2Y3Mjg5OTc1MTRlZGQzMzAzYjVhNzZkNjcwMTA4MzFiN2RhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.zZDx1YH2_Cwl5uylMzPJfR98yHG1vd1XfHrt5jY3Ryk)
- PDF Upload/URL Input: Upload PDFs or provide URLs to process and extract text.
- Text Extraction: Extracts and processes text from PDFs for interaction.
- Chatbot Interaction: Ask questions related to the uploaded PDFs and get responses.
- Text Preview: View a snippet of the extracted text before asking questions.
- Real-Time Responses: Quickly get answers based on the content of the documents.
- Integration with Vector Database: Uses ChromaDB for efficient document retrieval.
- Session Memory: The chatbot retains previous interactions during a session for continuity.
- Chat History: Keeps a log of the session’s conversations.
You can set up the project using the provided setup.py
file. This will automatically install the required dependencies listed in requirements.txt
.
- Make sure you have a
requirements.txt
file with the necessary packages. - Run the following command to install the package:
If you prefer to set up manually:
-
Install Streamlit, Langchain, Langchain Community and ChromaDB:
pip install streamlit langchain langchain_community chromadb
-
Running:
streamlit run application.py
-
For running Ollama (LLM):
ollama run llama3.2
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On Windows:
source venv/bin/activate