Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ for kk, vv in worddicts.items():
|
|
66 |
|
67 |
# Create an instance of the model
|
68 |
CALTEXT = CALTextModel.CALTEXT_Model(training=False)
|
69 |
-
|
70 |
test_loss = tf.keras.metrics.Mean(name='test_loss')
|
71 |
|
72 |
|
@@ -145,8 +145,8 @@ def test_error( images, x_mask):
|
|
145 |
|
146 |
def recognize_text(input_image):
|
147 |
x, x_mask=preprocess_img(input_image)
|
148 |
-
|
149 |
-
return
|
150 |
|
151 |
|
152 |
title = "CALText Demo"
|
|
|
66 |
|
67 |
# Create an instance of the model
|
68 |
CALTEXT = CALTextModel.CALTEXT_Model(training=False)
|
69 |
+
CALTEXT.load_weights('CALTextModel/cp-0037.ckpt')
|
70 |
test_loss = tf.keras.metrics.Mean(name='test_loss')
|
71 |
|
72 |
|
|
|
145 |
|
146 |
def recognize_text(input_image):
|
147 |
x, x_mask=preprocess_img(input_image)
|
148 |
+
output_str=test_error(x, x_mask)
|
149 |
+
return output_str
|
150 |
|
151 |
|
152 |
title = "CALText Demo"
|