farid678 commited on
Commit
6e4fcd7
1 Parent(s): cffe539

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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(shape=(128, 128)), gr.Text())
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()