arthurpendragon commited on
Commit
7bc6f9c
·
verified ·
1 Parent(s): 1291063

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -11
app.py CHANGED
@@ -30,13 +30,26 @@ def classify_mammogram(img):
30
 
31
  # Streamlit app
32
  st.title("Breast Cancer Detection App")
33
- st.write("Upload an image of a mammogram(an x-ray image of the breast), and the model will predict whether it is benign or malignant.")
 
 
 
 
 
 
 
 
 
 
 
 
34
  st.write(
35
  """
36
  <div style='display: flex; justify-content: space-between;'>
37
  <div style='width: 48%;'>
38
  <p style='font-size: 18px; font-weight: bold;'>Malignant</p>
39
  <p style='font-size: 16px;'>
 
40
  Non-suspicious: The AI is confident that no suspicious signs are present.<br>
41
  High risk: The AI is confident that the results are highly suspicious.<br>
42
  Indeterminate: The AI is uncertain and not confident in making a definitive classification.
@@ -45,6 +58,7 @@ st.write(
45
  <div style='width: 48%;'>
46
  <p style='font-size: 18px; font-weight: bold;'>Benign</p>
47
  <p style='font-size: 16px;'>
 
48
  Suspicious: AI is not that confident. Further Supervision is needed.<br>
49
  Non-Suspicious: AI is confident that there is nothing to worry about.<br>
50
  No Risk: AI is confident. No direct supervision is needed.
@@ -55,16 +69,6 @@ st.write(
55
  unsafe_allow_html=True
56
  )
57
 
58
- uploaded_file = st.file_uploader("Upload an image...", type=["jpg", "jpeg", "png"])
59
-
60
- if uploaded_file is not None:
61
- image = Image.open(uploaded_file)
62
- st.image(image, caption='Uploaded Image.', use_column_width=True)
63
- st.write("Classifying...")
64
-
65
- classification_result = classify_mammogram(image)
66
- st.write(classification_result)
67
-
68
  # Educational content
69
  st.markdown("### Learn More About Breast Cancer")
70
  st.markdown("""
 
30
 
31
  # Streamlit app
32
  st.title("Breast Cancer Detection App")
33
+ st.write("Upload an image of a mammogram(an X-ray image of the breast), and the model will predict whether it is benign or malignant.")
34
+
35
+
36
+ uploaded_file = st.file_uploader("Upload an image...", type=["jpg", "jpeg", "png"])
37
+
38
+ if uploaded_file is not None:
39
+ image = Image.open(uploaded_file)
40
+ st.image(image, caption='Uploaded Image.', use_column_width=True)
41
+ st.write("Classifying...")
42
+
43
+ classification_result = classify_mammogram(image)
44
+ st.write(classification_result)
45
+
46
  st.write(
47
  """
48
  <div style='display: flex; justify-content: space-between;'>
49
  <div style='width: 48%;'>
50
  <p style='font-size: 18px; font-weight: bold;'>Malignant</p>
51
  <p style='font-size: 16px;'>
52
+ Definition: very virulent or infectious.
53
  Non-suspicious: The AI is confident that no suspicious signs are present.<br>
54
  High risk: The AI is confident that the results are highly suspicious.<br>
55
  Indeterminate: The AI is uncertain and not confident in making a definitive classification.
 
58
  <div style='width: 48%;'>
59
  <p style='font-size: 18px; font-weight: bold;'>Benign</p>
60
  <p style='font-size: 16px;'>
61
+ Definition: Not harmful in effect
62
  Suspicious: AI is not that confident. Further Supervision is needed.<br>
63
  Non-Suspicious: AI is confident that there is nothing to worry about.<br>
64
  No Risk: AI is confident. No direct supervision is needed.
 
69
  unsafe_allow_html=True
70
  )
71
 
 
 
 
 
 
 
 
 
 
 
72
  # Educational content
73
  st.markdown("### Learn More About Breast Cancer")
74
  st.markdown("""