only set tesseract path on windows
This commit is contained in:
@@ -4,10 +4,9 @@ import logging
|
|||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
|
|
||||||
|
|
||||||
CROP = (
|
CROP = (
|
||||||
5, # x
|
5, # x
|
||||||
5, # y
|
5, # y
|
||||||
@@ -125,6 +124,9 @@ def store_results(results):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
if sys.platform == "win32":
|
||||||
|
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
|
||||||
|
|
||||||
setup_logger("INFO")
|
setup_logger("INFO")
|
||||||
|
|
||||||
results = load_results()
|
results = load_results()
|
||||||
|
|||||||
Reference in New Issue
Block a user