Skip to content

Commit

Permalink
Update image2text_example.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arxyzan committed Sep 20, 2023
1 parent 6a8ef5f commit 8f2f486
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/image2text_example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from hezar import Model

model = Model.load("hezarai/trocr-fa-v1")
text = model.predict(["assets/ocr_example.jpg"])
# model = Model.load("hezarai/trocr-fa-v1") # TrOCR
model = Model.load("hezarai/crnn-base-fa-64x256") # CRNN
text = model.predict("assets/ocr_example.jpg")
print(text)

0 comments on commit 8f2f486

Please sign in to comment.