hardin009 commited on
Commit
d1ea450
·
verified ·
1 Parent(s): 40a2fe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -45,14 +45,15 @@ def predict_stage(image):
45
  # 7. Return the final formatted string
46
  return f"🌾 Predicted Stage: {predicted_label.capitalize()} | Confidence: {confidence:.2f}"
47
 
 
48
  # Set up the Gradio interface
49
  interface = gr.Interface(
50
  fn=predict_stage,
51
  inputs=gr.Image(type="pil"),
52
  outputs="text",
53
- title="Cropsync Rice Crop Growth Stage Classifier",
54
  description="Upload a picture of the rice crop from the field to instantly detect its growth stage.",
55
- allow_flagging="never" # Disabled to keep the kiosk interface clean
56
  )
57
 
58
  if __name__ == "__main__":
 
45
  # 7. Return the final formatted string
46
  return f"🌾 Predicted Stage: {predicted_label.capitalize()} | Confidence: {confidence:.2f}"
47
 
48
+ # Set up the Gradio interface
49
  # Set up the Gradio interface
50
  interface = gr.Interface(
51
  fn=predict_stage,
52
  inputs=gr.Image(type="pil"),
53
  outputs="text",
54
+ title="Rice Crop Growth Stage Classifier",
55
  description="Upload a picture of the rice crop from the field to instantly detect its growth stage.",
56
+ flagging_mode="never" # Updated from allow_flagging for Gradio 4 compatibility
57
  )
58
 
59
  if __name__ == "__main__":