https://github.com/superduper-io/legal-documents-ai
Demo of SuperDuperDB as a tool and platform for performing legal documents AI, RAG and comprehension
https://github.com/superduper-io/legal-documents-ai
Last synced: 6 months ago
JSON representation
Demo of SuperDuperDB as a tool and platform for performing legal documents AI, RAG and comprehension
- Host: GitHub
- URL: https://github.com/superduper-io/legal-documents-ai
- Owner: superduper-io
- License: apache-2.0
- Created: 2024-03-21T10:02:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-01T02:08:22.000Z (about 1 year ago)
- Last Synced: 2024-11-08T21:36:24.557Z (7 months ago)
- Language: Python
- Size: 684 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# legal-documents-ai
Demo of SuperDuperDB as a tool and platform for performing legal documents AI, RAG and comprehension
### Installation
- `pip install -r requirements.txt`
- `python3 -m spacy download en`#### Specific format file dependencies
**doc/docx**
If we want to process files in doc/docx format, we need to install the following dependenciesLinux:
```
sudo apt update
sudo apt install libreoffice
```MacOs:
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install --cask libreoffice
```### Initilization
#### Start Mongodb service
```
docker run -itd --name mongo -p 27017:27017 mongo
```
#### Create PDF File System Service1. Create new window and goto root run `python -m http.server 8000`
#### Setup DB And Start streamlit App Service
1. Set OpenAI Key: `export OPENAI_API_KEY=sk-....`
2. Set `export PDF_FILE_SERVICE_HOST=localhost`
3. Set the pdf directory of the initialization data, if necessary: `export DOCUMENTS_FOLDER=documents`, default load the `./documents`
4. `streamlit run app.py`, if you want to reset rebuild the database, you can add `reset`: `streamlit run app.py -- --reset`