Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
| 1 |
-
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
iface.launch()
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from huggingface_hub import from_pretrained_keras
|
| 3 |
+
import numpy as np
|
| 4 |
|
| 5 |
+
reloaded_model = from_pretrained_keras('jmparejaz/Facial_Age-gender-eth_Recognition')
|
| 6 |
+
reloaded_model_eth = from_pretrained_keras('jmparejaz/Facial_eth_recognition')
|
| 7 |
|
| 8 |
+
def rgb2gray(rgb):
|
| 9 |
+
return np.dot(rgb[...,:3], [0.2989, 0.5870, 0.1140])
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
iface = gr.Interface(fn=rgb2gray, gr.inputs.Image(shape=(48, 48),), outputs="text")
|
| 14 |
iface.launch()
|