Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import tensorflow as tf
|
|
5 |
import keras
|
6 |
from keras import layers, models
|
7 |
|
8 |
-
model = model = tf.keras.models.load_model('model/ocr_model.h5')
|
9 |
|
10 |
def preprocessImage(img, shape):
|
11 |
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
@@ -78,4 +78,4 @@ def greet(name):
|
|
78 |
return "Hello " + name + "!!"
|
79 |
|
80 |
iface = gr.Interface(fn=predict, inputs="image", outputs="text")
|
81 |
-
iface.launch()
|
|
|
5 |
import keras
|
6 |
from keras import layers, models
|
7 |
|
8 |
+
model = model = tf.keras.models.load_model('model/ocr_model.h5', compile=False)
|
9 |
|
10 |
def preprocessImage(img, shape):
|
11 |
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
|
|
78 |
return "Hello " + name + "!!"
|
79 |
|
80 |
iface = gr.Interface(fn=predict, inputs="image", outputs="text")
|
81 |
+
iface.launch(sharing=True)
|