Kalbe-x-Bangkit
commited on
Commit
•
89f9c2d
1
Parent(s):
8267387
Update app.py
Browse files
app.py
CHANGED
@@ -78,8 +78,9 @@ def draw_bbox(image, bbox):
|
|
78 |
return image
|
79 |
|
80 |
|
|
|
81 |
|
82 |
-
|
83 |
|
84 |
st.write("Upload a chest X-ray image and click on 'Detect' to find out if there's any disease.")
|
85 |
|
@@ -91,7 +92,7 @@ if uploaded_file is not None:
|
|
91 |
file_bytes = np.asarray(bytearray(uploaded_file.read()), dtype=np.uint8)
|
92 |
image = cv2.imdecode(file_bytes, 1)
|
93 |
|
94 |
-
st.image(image, caption='Uploaded Image.', use_column_width=
|
95 |
|
96 |
if st.button('Detect'):
|
97 |
st.write("Processing...")
|
@@ -119,7 +120,7 @@ if uploaded_file is not None:
|
|
119 |
st.write(f"Prediction Confidence: {pred_label_confidence:.2f}")
|
120 |
|
121 |
output_image = draw_bbox(image.copy(), pred_bbox)
|
122 |
-
st.image(output_image, caption='Detected Image.', use_column_width=
|
123 |
|
124 |
@st.cache_resource
|
125 |
def load_gradcam_model():
|
|
|
78 |
return image
|
79 |
|
80 |
|
81 |
+
st.title("AI INTEGRATION FOR CHEST X-RAY")
|
82 |
|
83 |
+
st.header("Chest X-ray Disease Detection")
|
84 |
|
85 |
st.write("Upload a chest X-ray image and click on 'Detect' to find out if there's any disease.")
|
86 |
|
|
|
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)
|
96 |
|
97 |
if st.button('Detect'):
|
98 |
st.write("Processing...")
|
|
|
120 |
st.write(f"Prediction Confidence: {pred_label_confidence:.2f}")
|
121 |
|
122 |
output_image = draw_bbox(image.copy(), pred_bbox)
|
123 |
+
st.image(output_image, caption='Detected Image.', use_column_width=True)
|
124 |
|
125 |
@st.cache_resource
|
126 |
def load_gradcam_model():
|