Kalbe-x-Bangkit
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,13 @@ enhancement_type = st.sidebar.selectbox(
|
|
36 |
["Invert", "High Pass Filter", "Unsharp Masking", "Histogram Equalization", "CLAHE"]
|
37 |
)
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
H_detection = 224
|
40 |
W_detection = 224
|
41 |
|
@@ -88,8 +95,8 @@ model_detection = load_model_detection()
|
|
88 |
|
89 |
# uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "jpeg", "png", "dcm"])
|
90 |
|
91 |
-
if
|
92 |
-
file_bytes = np.asarray(bytearray(
|
93 |
image = cv2.imdecode(file_bytes, 1)
|
94 |
|
95 |
# st.image(image, caption='Uploaded Image.', use_column_width=True)
|
|
|
36 |
["Invert", "High Pass Filter", "Unsharp Masking", "Histogram Equalization", "CLAHE"]
|
37 |
)
|
38 |
|
39 |
+
st.sidebar.title("Detection")
|
40 |
+
uploaded_detection = st.sidebar.file_uploader("Upload image to detect", type=["png", "jpg", "jpeg", "dcm"])
|
41 |
+
# enhancement_type = st.sidebar.selectbox(
|
42 |
+
# "Enhancement Type",
|
43 |
+
# ["Invert", "High Pass Filter", "Unsharp Masking", "Histogram Equalization", "CLAHE"]
|
44 |
+
# )
|
45 |
+
|
46 |
H_detection = 224
|
47 |
W_detection = 224
|
48 |
|
|
|
95 |
|
96 |
# uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "jpeg", "png", "dcm"])
|
97 |
|
98 |
+
if uploaded_detection is not None:
|
99 |
+
file_bytes = np.asarray(bytearray(uploaded_detection.read()), dtype=np.uint8)
|
100 |
image = cv2.imdecode(file_bytes, 1)
|
101 |
|
102 |
# st.image(image, caption='Uploaded Image.', use_column_width=True)
|