Coder Social home page Coder Social logo

sudan94 / chat-pdf-hugginface Goto Github PK

View Code? Open in Web Editor NEW
32.0 1.0 15.0 10 KB

This is a fun Python project that allows you to chat with a chatbot about the PDF you uploaded. and generate a PDF transcript of the conversation. The project is built using Python and Streamlit framework.

License: MIT License

Python 96.71% Shell 3.29%
llm pdf-chat-bot huggingface chat-with-pdf chatfile chatpdf

chat-pdf-hugginface's Introduction

Chat with PDF

This Python project that allows you to chat with a chatbot about the PDF you uploaded. and generate a PDF transcript of the conversation. The project is built using Python and Streamlit framework.

This is a fork from https://github.com/sudan94/chat-pdf-hugginface. I had issues install the requirements.txt, thus I removed the '==version' in requirements.txt with

sed -i 's/\=.*//g' requirements.txt

Then, I added some modules that are needed for app.py that were not in requirements.txt.

A conda environment is used instead of venv virtual environment

Installation

To run this project, please follow the steps below:

  1. Clone the repository:
git clone [email protected]:MattLondon101/chat-pdf-hugginface.git
cd chat-pdf-hugginface
  1. Create and activate a conda virtual environment (optional but recommended):
conda create -n env1 python=3.10
conda activate env1
  1. Install the dependencies from the requirements.txt file:
pip install -r requirements.txt
  1. You will need a HUGGINGFACEHUB_API_TOKEN for this next step. To obtain one for free, got to https://huggingface.co/ and Sign Up for a free account. Then, go to Settings > Access Tokens. Create a New token. Then, create a file in this directory, name is .env and enter HUGGINGFACEHUB_API_TOKEN = "token", replacing token with your User Access Token. Save the .env file. The .gitignore file will ignore the .env for git operation.

Running the Project

Once you have installed the required dependencies, you can run the project using Streamlit, which should have been installed with requirements.txt. Streamlit provides an easy way to create interactive web applications in Python.

To start the application, run the following command:

streamlit run app.py

This will start the Streamlit server and open the application in your default web browser..

Git flow

.gitit.sh can be used for easy pushing updates to remote repo.

Activate with:

chmod +x .gitit.sh

Then, to add, commit, and push to remote repo:

./gitit.sh

License

This project is licensed under the MIT License.

chat-pdf-hugginface's People

Contributors

mattlondon101 avatar sudan94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.