MoinulwithAI commited on
Commit
5b50c83
·
verified ·
1 Parent(s): cc15c14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -59,14 +59,12 @@ def predict_age(image):
59
  age = output.item() # Convert to a single scalar
60
  return f"Predicted Age: {age:.2f}"
61
 
62
- # -------- GRADIO INTERFACE --------
63
  iface = gr.Interface(
64
  fn=predict_age,
65
- inputs=gr.Image(image_size=(128, 128), image_mode='RGB', source='upload'), # Corrected argument
66
  outputs="text",
67
  title="Age Prediction Model",
68
  description="Upload an image to predict the age.",
69
  live=True
70
  )
71
 
72
- iface.launch()
 
59
  age = output.item() # Convert to a single scalar
60
  return f"Predicted Age: {age:.2f}"
61
 
 
62
  iface = gr.Interface(
63
  fn=predict_age,
64
+ inputs=gr.Image(image_mode='RGB', source='upload'), # Removed image_size
65
  outputs="text",
66
  title="Age Prediction Model",
67
  description="Upload an image to predict the age.",
68
  live=True
69
  )
70