Spaces:
Sleeping
Sleeping
fix: PIL image for hotdog classifier
Browse files- src/main.py +3 -1
src/main.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
#import datetime
|
|
|
|
|
2 |
import json
|
3 |
import logging
|
4 |
import os
|
@@ -331,7 +333,7 @@ def main() -> None:
|
|
331 |
# display the image (use cached version, no need to reread)
|
332 |
col1.image(st.session_state.image, use_column_width=True)
|
333 |
# and then run inference on the image
|
334 |
-
predictions = pipeline_hot_dog(st.session_state.image)
|
335 |
|
336 |
col2.header("Probabilities")
|
337 |
first = True
|
|
|
1 |
#import datetime
|
2 |
+
from PIL import Image
|
3 |
+
|
4 |
import json
|
5 |
import logging
|
6 |
import os
|
|
|
333 |
# display the image (use cached version, no need to reread)
|
334 |
col1.image(st.session_state.image, use_column_width=True)
|
335 |
# and then run inference on the image
|
336 |
+
predictions = pipeline_hot_dog(Image(st.session_state.image))
|
337 |
|
338 |
col2.header("Probabilities")
|
339 |
first = True
|