Skip to content

Commit

Permalink
fix ocr notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
C-K-Loan committed Jul 13, 2024
1 parent 1cbc6b1 commit 2e0c130
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/colab/ocr/ocr_visual_document_deid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"source": [
"!pip install johnsnowlabs\n",
"from johnsnowlabs import nlp\n",
"nlp.install(visual=True,force_browser=True)\n",
"nlp.install(visual=True)\n",
"nlp.start(visual=True)"
],
"metadata": {
Expand Down Expand Up @@ -70,8 +70,7 @@
],
"source": [
"#loading the model\n",
"\n",
"model = nlu.load(\"en.image_deid\")"
"model = nlp.load(\"en.image_deid\")"
],
"metadata": {
"collapsed": false,
Expand Down Expand Up @@ -105,8 +104,11 @@
}
],
"source": [
"! wget https://github.com/JohnSnowLabs/nlu/raw/release/540/tests/datasets/ocr/deid/deid2.pdf\n",
"! wget https://github.com/JohnSnowLabs/nlu/raw/release/540/tests/datasets/ocr/deid/download.pdf\n",
"\n",
"#provide the input and the output path\n",
"input_path,output_path = ['F:\\\\Work\\\\repos\\\\nlu\\\\tests\\\\datasets\\\\ocr\\\\deid\\\\download.pdf','F:\\\\Work\\\\repos\\\\nlu\\\\tests\\\\datasets\\\\ocr\\\\deid\\\\deid2.pdf'], ['F:\\\\Work\\\\repos\\\\nlu\\\\tests\\\\datasets\\\\ocr\\\\deid\\\\download_deidentified.pdf','F:\\\\Work\\\\repos\\\\nlu\\\\tests\\\\datasets\\\\ocr\\\\deid\\\\deid2_deidentified.pdf']\n",
"input_path,output_path = ['download.pdf',' deid2.pdf'], ['download_deidentified.pdf',' deid2_deidentified.pdf']\n",
"\n",
"#predict and save the deidentified pdf's.\n",
"dfs = model.predict(input_path, output_path=output_path)"
Expand Down

0 comments on commit 2e0c130

Please sign in to comment.