Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
16 |
#img=load_img(a, grayscale=True)
|
17 |
logging.info("%s, %s "%(a.shape[0],a.shape[1])
|
18 |
-
|
19 |
-
return
|
20 |
|
21 |
|
22 |
-
gr.Interface(fn=fun, inputs="image", outputs="
|
|
|
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()
|