vahidrezanezhad commited on
Commit
40fa99d
·
verified ·
1 Parent(s): 1603a4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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