Skip to content

This is a Streamlit application that enables you to chat with the content of a PDF file using state-of-the-art NLP techniques! With this app, you can upload a PDF file, ask questions about its content, and get intelligent answers in real time.

License

Notifications You must be signed in to change notification settings

FDC0178/chat-with-pdf

Repository files navigation

Chat With Your PDF 📚🤖

This is a Streamlit application that enables you to chat with the content of a PDF file using state-of-the-art NLP techniques! With this app, you can upload a PDF file, ask questions about its content, and get intelligent answers in real time.


Demo 🚀

Screenshot:

App Screenshot

Video Tutorial:

You can follow this video tutorial to see how to set up and use the app!

Watch the video

Alternative hosting:
If you cannot view the embedded video: Download Video


Features ✨

  • 📓 PDF Parsing: Extracts content from PDF files for processing.
  • 🤗 Hugging Face Embeddings: Utilizes advanced NLP embeddings using the Instructor-based model.
  • 🔍 Retrieval QA Pipeline: Implements question-answering over your PDF content.
  • 🛠 Streamlit UI: A friendly, interactive user interface for uploading PDFs and asking questions.

Installation 🛠️

1. Clone the Repository

git clone /~https://github.com/FDC0178/chat-with-pdf.git
cd chat-with-pdf

2. Set Up a Python Virtual Environment

python -m venv venv
source venv/bin/activate  # For MacOS/Linux
venv\Scripts\activate     # For Windows

3. Install Dependencies

pip install -r requirements.txt

4. Set Up Environment Secrets

Add the Hugging Face API key in your secrets.toml file:

[default]
HUGGINGFACEHUB_API_TOKEN = "your-huggingface-token"

Alternatively, set this in the Streamlit Secrets section (if hosted on Streamlit Cloud).

5. Run the Application

streamlit run app.py

Usage 🖥️

  1. Upload your PDF file via the file uploader.
  2. Type in your questions in the text input box.
  3. The app provides intelligent answers and extracts the relevant content from the PDF.

Acknowledgments 🙏

We'd like to express our gratitude to the following resources for enabling this project:

  • 🤗 Hugging Face for pre-trained NLP models.
  • 📓 LangChain for retrieval-based NLP pipelines.
  • 🎨 Streamlit for its easy-to-use app development framework.
  • 🗂 FAISS for efficient similarity search and clustering.

Resources 📖

Here are some helpful links related to the project:


Contributing 🧬

We welcome contributions! Please fork the repo and make a pull request.


License 📜

This project is licensed under the MIT License.


About

This is a Streamlit application that enables you to chat with the content of a PDF file using state-of-the-art NLP techniques! With this app, you can upload a PDF file, ask questions about its content, and get intelligent answers in real time.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages