Spaces:
Sleeping
Sleeping
Commit
·
edda5d3
1
Parent(s):
08f1c81
initial commit
Browse files- .env.example +0 -1
- LICENSE +20 -0
- README.md +16 -7
- requirements.txt +0 -0
.env.example
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
HUGGINGFACEHUB_API_TOKEN =
|
|
|
|
|
|
LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2024 Matt London
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 4 |
+
a copy of this software and associated documentation files (the
|
| 5 |
+
"Software"), to deal in the Software without restriction, including
|
| 6 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 7 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 8 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 9 |
+
the following conditions:
|
| 10 |
+
|
| 11 |
+
The above copyright notice and this permission notice shall be
|
| 12 |
+
included in all copies or substantial portions of the Software.
|
| 13 |
+
|
| 14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 15 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 16 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 17 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
| 18 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 19 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
| 20 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
README.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
| 1 |
# Chat with PDF
|
| 2 |
|
| 3 |
-
This
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
## Installation
|
| 6 |
|
|
@@ -9,15 +18,15 @@ To run this project, please follow the steps below:
|
|
| 9 |
1. Clone the repository:
|
| 10 |
|
| 11 |
```shell
|
| 12 |
-
git clone
|
| 13 |
cd chat-pdf-hugginface
|
| 14 |
```
|
| 15 |
|
| 16 |
-
2. Create and activate a virtual environment (optional but recommended):
|
| 17 |
|
| 18 |
```shell
|
| 19 |
-
|
| 20 |
-
|
| 21 |
```
|
| 22 |
|
| 23 |
3. Install the dependencies from the `requirements.txt` file:
|
|
@@ -26,11 +35,11 @@ source venv/bin/activate
|
|
| 26 |
pip install -r requirements.txt
|
| 27 |
```
|
| 28 |
|
| 29 |
-
4.
|
| 30 |
|
| 31 |
## Running the Project
|
| 32 |
|
| 33 |
-
Once you have installed the required dependencies, you can run the project using Streamlit. Streamlit provides an easy way to create interactive web applications in Python.
|
| 34 |
|
| 35 |
To start the application, run the following command:
|
| 36 |
|
|
|
|
| 1 |
# Chat with PDF
|
| 2 |
|
| 3 |
+
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.
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
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
|
| 7 |
+
```shell
|
| 8 |
+
sed -i 's/\=.*//g' requirements.txt
|
| 9 |
+
```
|
| 10 |
+
Then, I added some modules that are needed for app.py that were not in requirements.txt.
|
| 11 |
+
|
| 12 |
+
A conda environment is used instead of ven virtual environment
|
| 13 |
|
| 14 |
## Installation
|
| 15 |
|
|
|
|
| 18 |
1. Clone the repository:
|
| 19 |
|
| 20 |
```shell
|
| 21 |
+
git clone git@github.com:MattLondon101/chat-pdf-hugginface.git
|
| 22 |
cd chat-pdf-hugginface
|
| 23 |
```
|
| 24 |
|
| 25 |
+
2. Create and activate a conda virtual environment (optional but recommended):
|
| 26 |
|
| 27 |
```shell
|
| 28 |
+
conda create -n env1 python=3.10
|
| 29 |
+
conda activate env1
|
| 30 |
```
|
| 31 |
|
| 32 |
3. Install the dependencies from the `requirements.txt` file:
|
|
|
|
| 35 |
pip install -r requirements.txt
|
| 36 |
```
|
| 37 |
|
| 38 |
+
4. 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.
|
| 39 |
|
| 40 |
## Running the Project
|
| 41 |
|
| 42 |
+
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.
|
| 43 |
|
| 44 |
To start the application, run the following command:
|
| 45 |
|
requirements.txt
CHANGED
|
Binary files a/requirements.txt and b/requirements.txt differ
|
|
|