Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
17 |
|
18 |
-
return
|
19 |
|
20 |
|
21 |
|
22 |
-
|
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()
|
|