Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Maclenn77 authored Dec 9, 2023
1 parent 16d3fdf commit fd1a31f
Showing 1 changed file with 73 additions and 11 deletions.
84 changes: 73 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,83 @@ pinned: false
license: mit
---

# pdf-explainer
An Intelligent Assistant that explains you the content of a PDF file
# PDF Explainer
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.

## Deployment
## Features

Deploy in HF with Streamlit-
PDF Explainer offers you the following key features:

## Local
- **Upload PDF files**: Upload PDF files until 200MB size. PDF files should be programmatically created or processed by an OCR tool.
- **Extract and split text**: Extract the content of your PDF files and split them for a better querying.
- **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)
- **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.

Run streamlit run app.py
## Demo

## Stack
[Try the PDF Explainer's demo](https://huggingface.co/spaces/maclenn77/pdf-explainer)!!!

- Streamlit
- HuggingFace
## Prerrequisites

For using the demo, you only need an OpenAI API Key.

If you prefer to clone the project and run on your local environment, you will require:

- Python ( developed with v3.11)
- OpenAI API Key
- Langchain
- ChromaDB
- pymupdf for pdf extraction
- An open ai openapi key
- Streamlit
- A code editor

## Setup

Follow the next steps to set up PDF Explainer in your local environment:

1. Clone this repository

```bash
git clone https://github.com/maclenn77/pdf-explainer.git
```

3. Navigate to the project directory
```bash
cd pdf-explainer
```
4. Create your .env file
```bash
touch .env
nano .env # or your prefered text editor
```
And add your OpenAI API Key on it.
```yaml
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
```
5. Install dependencies.
```bash
pip install -r requirements.txt
```
6. Run on your local environment
```bash
streamlit run app.py
```

## Deployment

PDF Explainer's repo includes workflows for deploying to HuggingFace.

1. **Check file size**: Prevents you to merge and deploy files over the limit provided by HuggingFace 🤗.
2. **Check lints**: Analize the code with pylint.
3. **Deploy to HuggingFace**: Once a branch is merged into main, the last version is deployed on your HuggingFace Space.

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`.

## Feedback and Contributions
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.

## License
This project is licensed under the MIT License. See the LICENSE file for details.

---

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.

0 comments on commit fd1a31f

Please sign in to comment.