Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,18 @@ import tensorflow as tf
|
|
3 |
from huggingface_hub import from_pretrained_keras
|
4 |
|
5 |
|
6 |
-
model = from_pretrained_keras("vahidrezanezhad/sbb_binarization")
|
7 |
|
8 |
-
print(model.summary())
|
9 |
|
10 |
|
11 |
-
def greet(
|
12 |
-
|
|
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
15 |
iface.launch()
|
|
|
3 |
from huggingface_hub import from_pretrained_keras
|
4 |
|
5 |
|
|
|
6 |
|
|
|
7 |
|
8 |
|
9 |
+
def greet(image):
|
10 |
+
model = from_pretrained_keras("vahidrezanezhad/sbb_binarization")
|
11 |
+
prediction = model.predict(image)
|
12 |
+
prediction = tf.squeeze(tf.round(prediction))
|
13 |
|
14 |
+
print(prediction.shape)
|
15 |
+
|
16 |
+
#print(model.summary())
|
17 |
+
return "Hello "
|
18 |
+
|
19 |
+
iface = gr.Interface(fn=greet, inputs="image", outputs="text")
|
20 |
iface.launch()
|