Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ def predict(input_img):
|
|
| 9 |
return input_img, {p["label"]: p["score"] for p in predictions} #Use dictionary to identify hotdog P in first loop is lebel hotdog with the score as output, another one is not hotdog
|
| 10 |
|
| 11 |
gradio_app = gr.Interface(
|
| 12 |
-
predict, #Call Predict function
|
| 13 |
inputs=gr.Image(label="Select hot dog candidate", sources=['upload', 'webcam'], type="pil"), #Receive 3 parameters are lebel, source, type of image for input
|
| 14 |
outputs=[gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)], #Receive another 3 parameters for output
|
| 15 |
title="Hot Dog? Or Not?",
|
|
|
|
| 9 |
return input_img, {p["label"]: p["score"] for p in predictions} #Use dictionary to identify hotdog P in first loop is lebel hotdog with the score as output, another one is not hotdog
|
| 10 |
|
| 11 |
gradio_app = gr.Interface(
|
| 12 |
+
predict, #Call Predict function after click submit
|
| 13 |
inputs=gr.Image(label="Select hot dog candidate", sources=['upload', 'webcam'], type="pil"), #Receive 3 parameters are lebel, source, type of image for input
|
| 14 |
outputs=[gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)], #Receive another 3 parameters for output
|
| 15 |
title="Hot Dog? Or Not?",
|