Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from keras.models import model_from_json
|
|
|
3 |
import numpy as np
|
4 |
|
5 |
|
@@ -25,5 +26,5 @@ def predict_age_gender(image):
|
|
25 |
return {'Gender': ['Fmale' if gender_predict > 0.5 else 'Male'], 'Age': age_predict[0][0]}
|
26 |
|
27 |
|
28 |
-
iface = gr.Interface(predict_age_gender, gr.Image(
|
29 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from keras.models import model_from_json
|
3 |
+
from tensorflow.keras.preprocessing import image
|
4 |
import numpy as np
|
5 |
|
6 |
|
|
|
26 |
return {'Gender': ['Fmale' if gender_predict > 0.5 else 'Male'], 'Age': age_predict[0][0]}
|
27 |
|
28 |
|
29 |
+
iface = gr.Interface(predict_age_gender, gr.Image(), gr.Text())
|
30 |
iface.launch()
|