Kalbe-x-Bangkit commited on
Commit
8be2a5a
·
verified ·
1 Parent(s): d1c7fa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
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 uploaded_file is not None:
92
- file_bytes = np.asarray(bytearray(uploaded_file.read()), dtype=np.uint8)
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)