OpenCV OCR and text recognition with Tesseract

Hello i have a .pb file which will work fine against new input images, how to get trained model code for the .pb file