import easyocr import sys if len(sys.argv)==3: if sys.argv[1]=="ja": #print("Loading JP data...") #print("Reading image "+sys.argv[2]) reader = easyocr.Reader(['ja','en']) print(reader.readtext(sys.argv[2])) else: #print("Loading EN data...") #print("Reading image "+sys.argv[2]) reader2 = easyocr.Reader(['en']) print(reader2.readtext(sys.argv[2])) else: print("Unspecified language. Format:") print(" runocr.py filename")