ppicazo commited on
Commit
d01e3cf
·
verified ·
1 Parent(s): 4bf29b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
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 display
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 {
25
- "Model v1 Predictions": results_v1,
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(