Spaces:
Running
Running
img1
Browse files
app.py
CHANGED
@@ -67,10 +67,6 @@ def predict_image(input):
|
|
67 |
# Return input image path, predicted class label, and confidence score
|
68 |
return input, {predicted_class_label: confidence_score}
|
69 |
|
70 |
-
def predict_image(input_img):
|
71 |
-
predictions = model1.predict(input_img)
|
72 |
-
return input_img, {p["label"]: p["score"] for p in predictions}
|
73 |
-
|
74 |
image_gradio_app = gr.Interface(
|
75 |
fn=predict_image,
|
76 |
inputs=gr.Image(label="Select waste candidate", sources=['upload', 'webcam'], type="pil"),
|
|
|
67 |
# Return input image path, predicted class label, and confidence score
|
68 |
return input, {predicted_class_label: confidence_score}
|
69 |
|
|
|
|
|
|
|
|
|
70 |
image_gradio_app = gr.Interface(
|
71 |
fn=predict_image,
|
72 |
inputs=gr.Image(label="Select waste candidate", sources=['upload', 'webcam'], type="pil"),
|