To do this for multiple files use the command:
for file in *.tif; do
tesseract "$file" "${file%.png}" --psm 6 lstm.train
done
This will generate all the lstm files