jmparejaz commited on
Commit
a4c1f2f
1 Parent(s): ac22fc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -22,7 +22,11 @@ def fun(a):
22
  dict_gender={0:'Male',1:'Female'}
23
  dict_eth={0:"White", 1:"Black", 2:"Asian", 3:"Indian", 4:"Hispanic"}
24
 
25
- return dict_gender[pred[0][0][0]],np.round(pred[1][0][0]),dict_eth[np.argmax(pred_eth)]
 
 
 
 
26
 
27
 
28
  gr.Interface(fn=fun, inputs=gr.inputs.Image(image_mode='L',type='numpy',invert_colors=False), outputs=["text","text","text"]).launch()
 
22
  dict_gender={0:'Male',1:'Female'}
23
  dict_eth={0:"White", 1:"Black", 2:"Asian", 3:"Indian", 4:"Hispanic"}
24
 
25
+ a = dict_gender[pred[0][0][0]]
26
+ b = np.round(pred[1][0][0])
27
+ c = dict_eth[np.argmax(pred_eth)]
28
+
29
+ return a,b,c
30
 
31
 
32
  gr.Interface(fn=fun, inputs=gr.inputs.Image(image_mode='L',type='numpy',invert_colors=False), outputs=["text","text","text"]).launch()