It is very difficult to detect the with tessearct. You can use Stroke Width Transform to detect the from the image . Then use blob or contour to extract the region. Apply tessearct with hindi language mode. In tessearct you will get confidence score for each word. If the input word is hindi you will get High confidence score. You can use the confidence score to classify whether the input word is hindi or English.