vahidrezanezhad commited on
Commit
ed88d55
·
verified ·
1 Parent(s): af4bf38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
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(name):
12
- return "Hello " + name + "!!"
 
 
13
 
14
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
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()