dfdfd
Browse files
app.py
CHANGED
|
@@ -23,7 +23,9 @@ reduce_header_height_style = """
|
|
| 23 |
"""
|
| 24 |
st.markdown(reduce_header_height_style, unsafe_allow_html=True)
|
| 25 |
|
| 26 |
-
def predict_image(name_image):
|
|
|
|
|
|
|
| 27 |
|
| 28 |
IMAGE_HEIGHT, IMAGE_WIDTH = 299, 299
|
| 29 |
categories = ['Normal', 'Tuberculose']
|
|
@@ -136,15 +138,19 @@ def inicializa_modelo():
|
|
| 136 |
|
| 137 |
with st.container():
|
| 138 |
col1 = st.container()
|
| 139 |
-
file_up = st.file_uploader("Carregue uma imagem:", type="png")
|
| 140 |
-
|
| 141 |
-
if file_up is not None:
|
| 142 |
-
|
| 143 |
-
else:
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
|
| 149 |
st.write("")
|
| 150 |
st.write("")
|
|
|
|
| 23 |
"""
|
| 24 |
st.markdown(reduce_header_height_style, unsafe_allow_html=True)
|
| 25 |
|
| 26 |
+
#def predict_image(name_image):
|
| 27 |
+
|
| 28 |
+
def predict_image():
|
| 29 |
|
| 30 |
IMAGE_HEIGHT, IMAGE_WIDTH = 299, 299
|
| 31 |
categories = ['Normal', 'Tuberculose']
|
|
|
|
| 138 |
|
| 139 |
with st.container():
|
| 140 |
col1 = st.container()
|
| 141 |
+
# file_up = st.file_uploader("Carregue uma imagem:", type="png")
|
| 142 |
+
|
| 143 |
+
# if file_up is not None:
|
| 144 |
+
# predict_image(file_up.name)
|
| 145 |
+
# else:
|
| 146 |
+
# name_image = "doencas_pulmonares.jpg"
|
| 147 |
+
# imagem = image.load_img(name_image)
|
| 148 |
+
# col1.image(imagem, width=700)
|
| 149 |
+
|
| 150 |
+
name_image = "doencas_pulmonares.jpg"
|
| 151 |
+
imagem = image.load_img(name_image)
|
| 152 |
+
col1.image(imagem, width=700)
|
| 153 |
+
predict_image()
|
| 154 |
|
| 155 |
st.write("")
|
| 156 |
st.write("")
|