Spaces:
Sleeping
Sleeping
readme update
Browse files
README.md
CHANGED
|
@@ -10,10 +10,10 @@ pinned: false
|
|
| 10 |
license: apache-2.0
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
1. Clone the repository
|
| 16 |
-
`git clone https://huggingface.co/spaces/langdonholmes/piilo`
|
| 17 |
|
| 18 |
2. Install dependencies from Pipfile
|
| 19 |
- Install pipenv, if you do not have it.
|
|
@@ -22,14 +22,28 @@ For development, try working with pipenv:
|
|
| 22 |
- Use pipenv to install from the Pipfile
|
| 23 |
- `pipenv install`
|
| 24 |
|
| 25 |
-
3.
|
| 26 |
|
| 27 |
```
|
| 28 |
pipenv install https://huggingface.co/langdonholmes/en_student_name_detector/resolve/main/en_student_name_detector-any-py3-none-any.whl
|
| 29 |
```
|
| 30 |
|
| 31 |
-
4.
|
| 32 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
TODO:
|
| 35 |
Create a command line version using Typer in this same repository.
|
|
|
|
| 10 |
license: apache-2.0
|
| 11 |
---
|
| 12 |
|
| 13 |
+
Currently, the best way to install PIILO is using pipenv:
|
| 14 |
|
| 15 |
1. Clone the repository
|
| 16 |
+
- `git clone https://huggingface.co/spaces/langdonholmes/piilo`
|
| 17 |
|
| 18 |
2. Install dependencies from Pipfile
|
| 19 |
- Install pipenv, if you do not have it.
|
|
|
|
| 22 |
- Use pipenv to install from the Pipfile
|
| 23 |
- `pipenv install`
|
| 24 |
|
| 25 |
+
3. Verify that the finetuned transformer model was installed
|
| 26 |
|
| 27 |
```
|
| 28 |
pipenv install https://huggingface.co/langdonholmes/en_student_name_detector/resolve/main/en_student_name_detector-any-py3-none-any.whl
|
| 29 |
```
|
| 30 |
|
| 31 |
+
4. Add PIILO to path
|
| 32 |
+
- Navigate to PIILO repository on your filesystem: `cd piilo`
|
| 33 |
+
- `pipenv install -e .`
|
| 34 |
+
|
| 35 |
+
5. Use piilo in your project
|
| 36 |
+
```
|
| 37 |
+
import piilo
|
| 38 |
+
|
| 39 |
+
texts = ['test string without identifiers', 'My name is Antonio. Email: Antonio99@yahoo.com']
|
| 40 |
+
|
| 41 |
+
# To analyze the texts. Returns list of RecognizerResult, defined by presidio_analyzer
|
| 42 |
+
results = [piilo.analyze(text) for text in texts]
|
| 43 |
+
|
| 44 |
+
# To analyze AND anonymize with hiding-in-plain-sight obfuscation. Returns list of texts with identifiers obfuscated.
|
| 45 |
+
cleaned_texts = [piilo.anonymize(text) for text in texts]
|
| 46 |
+
```
|
| 47 |
|
| 48 |
TODO:
|
| 49 |
Create a command line version using Typer in this same repository.
|