GonzaloZelinka/PII_POC

0

stars

27

commits

Jupyter Notebook

primary language

Apr 18, 2023

updated

README

Installation

Create a .venv

python3 -m virtualenv -p Python39 .venv

Activate the .venv

#For Windows
source .venv/Scripts/activate
#For Mac
source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

Using

You have some examples in the presidio.ipynb notebook.

Run model with csv data

  • It is necessary to run the utils/run_model.py script in the presidio notebook or in the terminal, for this function, the model must always be run in batch mode (below is only an optimized n-call method).
  • At the moment, the available models are obi/deid_roberta_i2b2 from HuggingFace and a custom-bert-model.
  • Initially (but you could change the function to accept another type of csv), The input csv file should have the following order:
"["id1", "id2"]","This product is awesome!"
"["id3", "id4"]","This product is bad..."

The first column is a list representing the IDs (e.g. PVIDs) associated with the review (second column).

  • For improved performance, you can run the model with a CUDA device.

For more context:

Contributors

GonzaloZelinka

27 commits

GonzaloZelinka/PII_POC

0

stars

27

commits

Jupyter Notebook

primary language

Apr 18, 2023

updated

README

Installation

Create a .venv

python3 -m virtualenv -p Python39 .venv

Activate the .venv

#For Windows
source .venv/Scripts/activate
#For Mac
source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

Using

You have some examples in the presidio.ipynb notebook.

Run model with csv data

  • It is necessary to run the utils/run_model.py script in the presidio notebook or in the terminal, for this function, the model must always be run in batch mode (below is only an optimized n-call method).
  • At the moment, the available models are obi/deid_roberta_i2b2 from HuggingFace and a custom-bert-model.
  • Initially (but you could change the function to accept another type of csv), The input csv file should have the following order:
"["id1", "id2"]","This product is awesome!"
"["id3", "id4"]","This product is bad..."

The first column is a list representing the IDs (e.g. PVIDs) associated with the review (second column).

  • For improved performance, you can run the model with a CUDA device.

For more context:

Contributors

GonzaloZelinka

27 commits

Languages

Jupyter Notebook

74.7%

Python

25.3%