Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,14 +17,12 @@ def predict(image):
|
|
17 |
predictions_v1 = model_pipeline_v1(resized_image)
|
18 |
predictions_v2 = model_pipeline_v2(resized_image)
|
19 |
|
20 |
-
# Format the results for
|
21 |
results_v1 = {p["label"]: p["score"] for p in predictions_v1}
|
22 |
results_v2 = {p["label"]: p["score"] for p in predictions_v2}
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
"Model v2 Predictions": results_v2,
|
27 |
-
}
|
28 |
|
29 |
# Define the Gradio Interface
|
30 |
gr.Interface(
|
|
|
17 |
predictions_v1 = model_pipeline_v1(resized_image)
|
18 |
predictions_v2 = model_pipeline_v2(resized_image)
|
19 |
|
20 |
+
# Format the results for each model
|
21 |
results_v1 = {p["label"]: p["score"] for p in predictions_v1}
|
22 |
results_v2 = {p["label"]: p["score"] for p in predictions_v2}
|
23 |
|
24 |
+
# Return results as separate outputs
|
25 |
+
return results_v1, results_v2
|
|
|
|
|
26 |
|
27 |
# Define the Gradio Interface
|
28 |
gr.Interface(
|