Update app.py
Browse files20 unmodified lines21222324252627282930313220 unmodified linesreturn f"{predicted_class} ({confidence*100:.1f}%)"# Use gr.Camera instead of gr.Imageinterface = gr.Interface(fn=predict_from_webcam,inputs=gr.Camera(type="pil"),outputs="text",title="Live Waste Classifier",description="Point your webcam at a waste item. The model will predict its type in real-time.")interface.launch()20 unmodified lines212223242526272829303132333420 unmodified linesreturn f"{predicted_class} ({confidence*100:.1f}%)"# Use gr.Camera instead of gr.Imagegr.Interface(fn=predict_from_webcam,inputs=gr.Image(shape=(224, 224), tool=None, type="pil", label="Capture Image from Webcam"),outputs="text",live=True,title="Live Waste Classifier",description="Click webcam icon and show a waste image to classify.")interface.launch()
app.py+5-3