Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
|
|
|
| 3 |
from huggingface_hub import from_pretrained_keras
|
| 4 |
|
| 5 |
|
|
@@ -8,6 +9,8 @@ from huggingface_hub import from_pretrained_keras
|
|
| 8 |
|
| 9 |
def greet(image):
|
| 10 |
model = from_pretrained_keras("vahidrezanezhad/sbb_binarization")
|
|
|
|
|
|
|
| 11 |
prediction = model.predict(image.reshape(1,image.shape[0],image.shape[1],image.shape[2]))
|
| 12 |
prediction = tf.squeeze(tf.round(prediction))
|
| 13 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
| 3 |
+
import numpy as np
|
| 4 |
from huggingface_hub import from_pretrained_keras
|
| 5 |
|
| 6 |
|
|
|
|
| 9 |
|
| 10 |
def greet(image):
|
| 11 |
model = from_pretrained_keras("vahidrezanezhad/sbb_binarization")
|
| 12 |
+
print(np.shape(image))
|
| 13 |
+
print(type(image))
|
| 14 |
prediction = model.predict(image.reshape(1,image.shape[0],image.shape[1],image.shape[2]))
|
| 15 |
prediction = tf.squeeze(tf.round(prediction))
|
| 16 |
|