Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import tensorflow as tf | |
| import numpy as np | |
| from huggingface_hub import from_pretrained_keras | |
| def greet(image): | |
| model = from_pretrained_keras("vahidrezanezhad/sbb_binarization") | |
| prediction = model.predict(image.reshape(1,224,448,image.shape[2])) | |
| prediction = tf.squeeze(tf.round(prediction)) | |
| print(prediction.shape) | |
| #print(model.summary()) | |
| return "Hello " | |
| iface = gr.Interface(fn=greet, inputs=gr.Image(), outputs="text") | |
| iface.launch() | |