M. Saad Munawar commited on
Commit
33871ce
1 Parent(s): cf4755f

https://huggingface.co/spaces/Saad123/minimal

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -1,5 +1,12 @@
1
  import gradio as gr
2
- def hello(name):
3
- return "Hello"+name
4
- interface = gr.Interface(fn=hello, inputs='text', outputs='text')
5
- interface.launch()
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import numpy as np
3
+
4
+ def model(image):
5
+ im_scaled = image/255
6
+ im_reshape = np.reshape(im_scaled,[1,224,224,3])
7
+ return im_reshape
8
+
9
+ image = gr.inputs.Image(shape=(224,224))
10
+
11
+ iface = gr.Interface(fn=model, inputs=image, outputs='numpy')
12
+ iface.launch()