jmparejaz commited on
Commit
4374108
·
1 Parent(s): 4b0f6d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,11 +12,11 @@ def rgb2gray(rgb):
12
  return np.dot(rgb[...,:3], [0.2989, 0.5870, 0.1140])
13
 
14
  def fun(a):
15
- #reloaded_model = from_pretrained_keras('jmparejaz/Facial_Age-gender-eth_Recognition')
16
  #img=load_img(a, grayscale=True)
17
  logging.info("%s, %s "%(a.shape[0],a.shape[1])
18
- #inp = a.reshape((-1, 48, 48, 3))
19
- return a
20
 
21
 
22
- gr.Interface(fn=fun, inputs="image", outputs="image").launch()
 
12
  return np.dot(rgb[...,:3], [0.2989, 0.5870, 0.1140])
13
 
14
  def fun(a):
15
+ reloaded_model = from_pretrained_keras('jmparejaz/Facial_Age-gender-eth_Recognition')
16
  #img=load_img(a, grayscale=True)
17
  logging.info("%s, %s "%(a.shape[0],a.shape[1])
18
+ pred=reloaded_model.predict(a)
19
+ return pred
20
 
21
 
22
+ gr.Interface(fn=fun, inputs="image", outputs=["label","text"]).launch()