Skip to content

Commit

Permalink
chore: clean up comments in app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovandenhooff committed Apr 22, 2022
1 parent a6d1d65 commit 6905f04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ def get_predictions():
img_bytes = utils.b64_to_bytes(data["image"])
img_tensor = utils.bytes_to_tensor(img_bytes)

# choose model
# choose model based on user selection
model_name = data["modelName"]
model = MODELS[model_name]

# get top 3 predictions then wrangle for FE
# get top 3 predictions
pred_probs, pred_labels, pred_classes = prediction.get_topk_predictions(
model, img_tensor, k=3
)

# wrangle predictions for frontend
predictions = prediction.wrangle_topk_predictions(
pred_probs, pred_labels, pred_classes
)
Expand Down

0 comments on commit 6905f04

Please sign in to comment.