Tayaba171 commited on
Commit
9defbc9
1 Parent(s): 8f7443f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,14 +11,14 @@ os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
11
 
12
 
13
  # Create an instance of the model
14
- CALTEXT = CALTextModel.CALTEXT_Model(training=False)
15
- CALTEXT.load_weights('final_caltextModel/cp-0037.ckpt')
16
  test_loss = tf.keras.metrics.Mean(name='test_loss')
17
 
18
 
19
  def recognize_text(input_image):
20
  x, x_mask=data.preprocess_img(input_image)
21
- output_str, gifImage=CALTextModel.predict(x, x_mask)
22
  return output_str,gifImage
23
 
24
  examples = [['sample_test_images/59-11.png'],
 
11
 
12
 
13
  # Create an instance of the model
14
+ CALText = CALTextModel.CALText_Model(training=False)
15
+ CALText.load_weights('final_caltextModel/cp-0037.ckpt')
16
  test_loss = tf.keras.metrics.Mean(name='test_loss')
17
 
18
 
19
  def recognize_text(input_image):
20
  x, x_mask=data.preprocess_img(input_image)
21
+ output_str, gifImage=CALTextModel.predict(CALText, x, x_mask)
22
  return output_str,gifImage
23
 
24
  examples = [['sample_test_images/59-11.png'],