Skip to content

Commit

Permalink
readme and better color
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent committed Oct 18, 2023
1 parent 8ed6147 commit afe92b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ You can install this plugin via `pip`.
pip install "prodigy-pdf @ git+https://github.com/explosion/prodigy-pdf"
```

If you want to use the OCR recipes, you'll also want to ensure that tesseract is installed.

```bash
# for mac
brew install tesseract

# for ubuntu
sudo apt install tesseract-ocr
```

To learn more about this plugin, you can check the [Prodigy docs](https://prodi.gy/docs/plugins/#pdf).

## Issues?
Expand Down
6 changes: 3 additions & 3 deletions prodigy_pdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def before_db(examples):
del eg["image"]
return examples

color = ["#ffff00", "#00ffff", "#ff00ff", "#00ff7f", "#ff6347", "#00bfff",
color = ["#00ffff", "#ff00ff", "#00ff7f", "#ff6347", "#00bfff",
"#ffa500", "#ff69b4", "#7fffd4", "#ffd700", "#ffdab9", "#adff2f",
"#d2b48c", "#dcdcdc"]
"#d2b48c", "#dcdcdc", "#ffff00", ]

return {
"dataset": dataset,
Expand All @@ -80,7 +80,7 @@ def before_db(examples):
"view_id": "image_manual",
"config": {
"labels": labels.split(","),
"image_manual_stroke_width": 1,
"image_manual_stroke_width": 2,
"custom_theme": {
"labels": {
lab: color[i] for i, lab in enumerate(labels.split(","))
Expand Down

0 comments on commit afe92b3

Please sign in to comment.