CoolFace
Apppublic

langdonholmes/piilo

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
1likes
App README

Currently, the best way to install PIILO is using pipenv:

  1. 1.Clone the repository
  2. 2.git clone https://huggingface.co/spaces/langdonholmes/piilo
  1. 1.Install dependencies from Pipfile
  2. 2.Install pipenv, if you do not have it.
  3. 3.pip install --user pipenv
  • Use pipenv to install from the Pipfile
  • pipenv install
  1. 1.Install the finetuned transformer
pipenv install https://huggingface.co/langdonholmes/en_student_name_detector/resolve/main/en_student_name_detector-any-py3-none-any.whl
  1. 1.Add PIILO to path
  2. 2.Navigate to PIILO repository on your filesystem: cd piilo
  3. 3.pipenv install -e .
  1. 1.Use piilo in your project
import piilo

texts = ['test string without identifiers', 'My name is Antonio. Email: Antonio99@yahoo.com']

# To analyze the texts. Returns list of RecognizerResult, defined by presidio_analyzer
results = [piilo.analyze(text) for text in texts]

# To analyze AND anonymize with hiding-in-plain-sight obfuscation. Returns list of texts with identifiers obfuscated.
cleaned_texts = [piilo.anonymize(text) for text in texts]

TODO: Create a command line version using Typer in this same repository.