Skip to content

Commit

Permalink
chore: update empty model condition
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Apr 24, 2024
1 parent dfbe091 commit f1e8ec5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handlers/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def could_enable_ocr(model: str = "") -> bool:
# if OCR is disabled
return False

if len(model) == 0:
# if model is not defined
return True

if contains(model, OCR_SKIP_MODELS):
# if model is in skip list
return False
Expand Down

0 comments on commit f1e8ec5

Please sign in to comment.