jmparejaz commited on
Commit
0c5845f
·
1 Parent(s): ca47061

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  from huggingface_hub import from_pretrained_keras
3
  import numpy as np
4
- from PIL import Image
5
 
6
 
7
 
@@ -13,11 +13,10 @@ def rgb2gray(rgb):
13
 
14
  def fun(a):
15
  reloaded_model = from_pretrained_keras('jmparejaz/Facial_Age-gender-eth_Recognition')
16
- b=np.asarray(Image.open(a))
17
 
18
- return ("%s"%b,a)
19
 
20
 
21
 
22
- iface = gr.Interface(fn=fun, inputs=gr.Image(shape=(48, 48), outputs=["text","image"])
23
- iface.launch()
 
1
  import gradio as gr
2
  from huggingface_hub import from_pretrained_keras
3
  import numpy as np
4
+ #from PIL import Image
5
 
6
 
7
 
 
13
 
14
  def fun(a):
15
  reloaded_model = from_pretrained_keras('jmparejaz/Facial_Age-gender-eth_Recognition')
16
+ inp = inp.reshape((-1, 224, 224, 3))
17
 
18
+ return inp
19
 
20
 
21
 
22
+ gr.Interface(fn=fun, inputs=gr.Image(shape=(48, 48)), outputs="text").launch()