Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ uploaded_file = st.file_uploader("Upload an image of a chest x-ray", type=["jpg"
|
|
44 |
if uploaded_file is not None:
|
45 |
# Convert the file-like object to bytes, then open it with PIL
|
46 |
image_bytes = uploaded_file.getvalue()
|
47 |
-
image = Image.open(io.BytesIO(image_bytes))
|
48 |
|
49 |
# Display the uploaded image
|
50 |
st.image(image, caption='Uploaded Image.', use_column_width=True)
|
|
|
44 |
if uploaded_file is not None:
|
45 |
# Convert the file-like object to bytes, then open it with PIL
|
46 |
image_bytes = uploaded_file.getvalue()
|
47 |
+
image = Image.open(io.BytesIO(image_bytes)).convert('RGB') # make it three channel like training set
|
48 |
|
49 |
# Display the uploaded image
|
50 |
st.image(image, caption='Uploaded Image.', use_column_width=True)
|