From 2761417485c83f4632ae5fce1f43457ef8d7435f Mon Sep 17 00:00:00 2001 From: Laure Vancau Date: Sat, 21 Dec 2024 19:39:23 +0100 Subject: [PATCH] fix: PIL image for hotdog classifier --- src/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 2193dab..d49473c 100644 --- a/src/main.py +++ b/src/main.py @@ -1,4 +1,6 @@ #import datetime +from PIL import Image + import json import logging import os @@ -331,7 +333,7 @@ def main() -> None: # display the image (use cached version, no need to reread) col1.image(st.session_state.image, use_column_width=True) # and then run inference on the image - predictions = pipeline_hot_dog(st.session_state.image) + predictions = pipeline_hot_dog(Image(st.session_state.image)) col2.header("Probabilities") first = True