Spaces:
Sleeping
Sleeping
Michael Rey
commited on
Commit
·
ff2fe1c
1
Parent(s):
b68bda0
fixed error
Browse files- src/streamlit_app.py +2 -0
src/streamlit_app.py
CHANGED
@@ -21,6 +21,7 @@ import torchvision.transforms as transforms
|
|
21 |
from PIL import Image
|
22 |
from resnet_model import MonkeyResNet
|
23 |
from data_loader import get_data_loaders
|
|
|
24 |
|
25 |
|
26 |
# Ensure the parent directory is in the system path for module imports
|
@@ -100,6 +101,7 @@ with tab2:
|
|
100 |
raw_bytes = uploaded_file.read()
|
101 |
image = Image.open(io.BytesIO(raw_bytes)).convert("RGB")
|
102 |
st.image(image, caption="Uploaded Image", width=300)
|
|
|
103 |
|
104 |
input_tensor = preprocess_image(image)
|
105 |
|
|
|
21 |
from PIL import Image
|
22 |
from resnet_model import MonkeyResNet
|
23 |
from data_loader import get_data_loaders
|
24 |
+
import io
|
25 |
|
26 |
|
27 |
# Ensure the parent directory is in the system path for module imports
|
|
|
101 |
raw_bytes = uploaded_file.read()
|
102 |
image = Image.open(io.BytesIO(raw_bytes)).convert("RGB")
|
103 |
st.image(image, caption="Uploaded Image", width=300)
|
104 |
+
input_tensor = preprocess_image(image)
|
105 |
|
106 |
input_tensor = preprocess_image(image)
|
107 |
|