maclenn77 commited on
Commit
fd1a31f
·
unverified ·
1 Parent(s): 16d3fdf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -11
README.md CHANGED
@@ -9,21 +9,83 @@ pinned: false
9
  license: mit
10
  ---
11
 
12
- # pdf-explainer
13
- An Intelligent Assistant that explains you the content of a PDF file
14
 
15
- ## Deployment
16
 
17
- Deploy in HF with Streamlit-
18
 
19
- ## Local
 
 
 
20
 
21
- Run streamlit run app.py
22
 
23
- ## Stack
24
 
25
- - Streamlit
26
- - HuggingFace
 
 
 
 
 
 
 
27
  - ChromaDB
28
- - pymupdf for pdf extraction
29
- - An open ai openapi key
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  license: mit
10
  ---
11
 
12
+ # PDF Explainer
13
+ PDF Explainer is a tool that helps you to create your own knowledge base for retrieval information when interacting with a LLM. The app take advantage of the frameworks Streamlit and Langchain and uses a client-side ChromaDB.
14
 
15
+ ## Features
16
 
17
+ PDF Explainer offers you the following key features:
18
 
19
+ - **Upload PDF files**: Upload PDF files until 200MB size. PDF files should be programmatically created or processed by an OCR tool.
20
+ - **Extract and split text**: Extract the content of your PDF files and split them for a better querying.
21
+ - **Store in a client-side VectorDB**: PDF Explainer uses ChromaDB for storing the content of your pdf files on vectors (ChromaDB use by default "all-MiniLM-L6-v2" for embeddings)
22
+ - **Consult the info of your knowledge base": Ask questions to the Intelligent Assitant about the content of your knowledge base. The Langchain Agent will use the ChromaDB query functions as a tool.
23
 
24
+ ## Demo
25
 
26
+ [Try the PDF Explainer's demo](https://huggingface.co/spaces/maclenn77/pdf-explainer)!!!
27
 
28
+ ## Prerrequisites
29
+
30
+ For using the demo, you only need an OpenAI API Key.
31
+
32
+ If you prefer to clone the project and run on your local environment, you will require:
33
+
34
+ - Python ( developed with v3.11)
35
+ - OpenAI API Key
36
+ - Langchain
37
  - ChromaDB
38
+ - Streamlit
39
+ - A code editor
40
+
41
+ ## Setup
42
+
43
+ Follow the next steps to set up PDF Explainer in your local environment:
44
+
45
+ 1. Clone this repository
46
+
47
+ ```bash
48
+ git clone https://github.com/maclenn77/pdf-explainer.git
49
+ ```
50
+
51
+ 3. Navigate to the project directory
52
+ ```bash
53
+ cd pdf-explainer
54
+ ```
55
+ 4. Create your .env file
56
+ ```bash
57
+ touch .env
58
+ nano .env # or your prefered text editor
59
+ ```
60
+ And add your OpenAI API Key on it.
61
+ ```yaml
62
+ OPENAI_API_KEY=YOUR_OPENAI_API_KEY
63
+ ```
64
+ 5. Install dependencies.
65
+ ```bash
66
+ pip install -r requirements.txt
67
+ ```
68
+ 6. Run on your local environment
69
+ ```bash
70
+ streamlit run app.py
71
+ ```
72
+
73
+ ## Deployment
74
+
75
+ PDF Explainer's repo includes workflows for deploying to HuggingFace.
76
+
77
+ 1. **Check file size**: Prevents you to merge and deploy files over the limit provided by HuggingFace 🤗.
78
+ 2. **Check lints**: Analize the code with pylint.
79
+ 3. **Deploy to HuggingFace**: Once a branch is merged into main, the last version is deployed on your HuggingFace Space.
80
+
81
+ For deploying, you need to add `HF_TOKEN` as secret in the settings of your fork and add yoyr HuggingFace user with the variable name `HF_USERNAME`.
82
+
83
+ ## Feedback and Contributions
84
+ If you have any feedback or would like to contribute to PDF Explainer's development, please feel free to open issues or submit pull requests in the GitHub repository.
85
+
86
+ ## License
87
+ This project is licensed under the MIT License. See the LICENSE file for details.
88
+
89
+ ---
90
+
91
+ Enjoy using PDF Explainer to create and consult your knowled base! If you have any questions or encounter issues during the setup process, please don't hesitate to reach out for assistance.