lukmanaj commited on
Commit
d2c554b
·
verified ·
1 Parent(s): 2e4c508

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)