Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import from_pretrained_keras
|
| 3 |
import numpy as np
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
#reloaded_model_eth = from_pretrained_keras('jmparejaz/Facial_eth_recognition')
|
|
@@ -10,10 +13,11 @@ def rgb2gray(rgb):
|
|
| 10 |
|
| 11 |
def fun(a):
|
| 12 |
reloaded_model = from_pretrained_keras('jmparejaz/Facial_Age-gender-eth_Recognition')
|
|
|
|
| 13 |
|
| 14 |
-
return ("%s"%
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
-
iface = gr.Interface(fn=fun, inputs=
|
| 19 |
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 |
|
| 8 |
|
| 9 |
#reloaded_model_eth = from_pretrained_keras('jmparejaz/Facial_eth_recognition')
|
|
|
|
| 13 |
|
| 14 |
def fun(a):
|
| 15 |
reloaded_model = from_pretrained_keras('jmparejaz/Facial_Age-gender-eth_Recognition')
|
| 16 |
+
b=np.asarray(Image.open(a))
|
| 17 |
|
| 18 |
+
return ("%s"%b,a)
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
+
iface = gr.Interface(fn=fun, inputs=gr.Image(shape=(48, 48), outputs=["text","image"])
|
| 23 |
iface.launch()
|