Spaces:
Sleeping
Sleeping
nishantguvvada
commited on
Commit
·
86f5b35
1
Parent(s):
0955787
Update app.py
Browse files
app.py
CHANGED
@@ -17,19 +17,9 @@ st.write("""
|
|
17 |
"""
|
18 |
)
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
# # file = uploaded_file.getvalue()
|
23 |
-
# # st.image(file)
|
24 |
-
# file = BytesIO(uploadedFile)
|
25 |
-
st.set_option('deprecation.showfileUploaderEncoding', False)
|
26 |
-
uploaded_files = st.file_uploader("Upload a Hip-Implant X-ray image", accept_multiple_files=True)
|
27 |
-
for uploaded_file in uploaded_files:
|
28 |
-
bytes_data = uploaded_file.read()
|
29 |
-
st.write("filename:", uploaded_file.name)
|
30 |
-
st.image(uploaded_file)
|
31 |
|
32 |
-
st.set_option('deprecation.showfileUploaderEncoding', False)
|
33 |
def model_prediction(img, model):
|
34 |
resize = tf.image.resize(img, (256,256))
|
35 |
yhat = model.predict(np.expand_dims(resize/255, 0))
|
|
|
17 |
"""
|
18 |
)
|
19 |
|
20 |
+
file = st.file_uploader("Upload an X-ray image", type= ['png', 'jpg'])
|
21 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
|
|
23 |
def model_prediction(img, model):
|
24 |
resize = tf.image.resize(img, (256,256))
|
25 |
yhat = model.predict(np.expand_dims(resize/255, 0))
|