Spaces:
Sleeping
Sleeping
File size: 613 Bytes
cd0e075 f0909a7 cd0e075 f0909a7 cd0e075 f0909a7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import pytesseract
import asyncio
# tessdata_dir_config = '--tessdata-dir "E:/Programming/python/image-demo/tessdata"'
pytesseract.pytesseract.tesseract_cmd = "C:\Program Files\Tesseract-OCR\\tesseract.exe"
from pytesseract import Output
import cv2
import pandas as pd
from app.utils.mark import mark_image
async def main():
filename = "devto.png"
img = cv2.imread(filename)
markedImg = await mark_image(img, "comment")
cv2.imwrite("output.jpg", markedImg)
cv2.imshow("Demo", markedImg)
cv2.waitKey(0)
cv2.destroyAllWindows()
if __name__ == "__main__":
asyncio.run(main())
|