Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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()
|