Skip to content

Commit

Permalink
fix ruff workflow (#105)
Browse files Browse the repository at this point in the history
* fix ruff workflow

* add formatting error

* add lint error

* revert errors
  • Loading branch information
kha-white authored Jul 9, 2024
1 parent cbfd3d4 commit ec756f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- uses: actions/checkout@v4
- run: pip install --user ruff
- run: ruff check --output-format=github .
- run: ruff format --diff .
2 changes: 1 addition & 1 deletion mokuro/manga_page_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(

if not self.disable_ocr:
cuda = torch.cuda.is_available()
device = 'cuda' if cuda and not force_cpu else 'cpu'
device = "cuda" if cuda and not force_cpu else "cpu"
logger.info(f"Initializing text detector, using device {device}")
self.text_detector = TextDetector(
model_path=cache.comic_text_detector, input_size=detector_input_size, device=device, act="leaky"
Expand Down

0 comments on commit ec756f9

Please sign in to comment.