nishantguvvada commited on
Commit
19e570f
·
1 Parent(s): 46194c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import tensorflow as tf
3
  import cv2
4
  import numpy as np
5
  from PIL import Image, ImageOps
6
- from io import BytesIO
7
 
8
  @st.cache_resource()
9
  def load_model():
@@ -19,7 +19,9 @@ st.write("""
19
 
20
  st.set_option('deprecation.showfileUploaderEncoding', False)
21
  uploadedFile = st.file_uploader("Upload an X-ray image")
22
- file = BytesIO(uploadedFile)
 
 
23
 
24
  st.set_option('deprecation.showfileUploaderEncoding', False)
25
  def model_prediction(img, model):
 
3
  import cv2
4
  import numpy as np
5
  from PIL import Image, ImageOps
6
+ #from io import BytesIO
7
 
8
  @st.cache_resource()
9
  def load_model():
 
19
 
20
  st.set_option('deprecation.showfileUploaderEncoding', False)
21
  uploadedFile = st.file_uploader("Upload an X-ray image")
22
+ file = uploaded_file.getvalue()
23
+ st.image(file)
24
+ #file = BytesIO(uploadedFile)
25
 
26
  st.set_option('deprecation.showfileUploaderEncoding', False)
27
  def model_prediction(img, model):