Yadvendra commited on
Commit
ebf027a
·
verified ·
1 Parent(s): f03353b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,7 +34,7 @@ def get_class_label(predicted_class_index):
34
  return label_encoder.inverse_transform([predicted_class_index])[0] # Get class label
35
 
36
  # Streamlit App UI
37
- st.title("Dementia Detection using CNN")
38
  st.write("Upload a brain scan (JPG format), and the model will predict its class.")
39
 
40
  # File uploader for user to upload images
@@ -42,7 +42,7 @@ uploaded_file = st.file_uploader("Choose a JPG image...", type="jpg")
42
 
43
  if uploaded_file is not None:
44
  st.image(uploaded_file, caption="Uploaded Image", use_column_width=True)
45
- st.write("Classifying...")
46
 
47
  # Load and preprocess the image
48
  processed_image = load_and_preprocess_image(uploaded_file)
@@ -54,4 +54,4 @@ if uploaded_file is not None:
54
  predicted_class_label = get_class_label(predicted_class_index)
55
 
56
  # Display the result
57
- st.write(f"The predicted class is: **{predicted_class_label}**")
 
34
  return label_encoder.inverse_transform([predicted_class_index])[0] # Get class label
35
 
36
  # Streamlit App UI
37
+ st.title("Alzheimer Detection using CNN 🧠")
38
  st.write("Upload a brain scan (JPG format), and the model will predict its class.")
39
 
40
  # File uploader for user to upload images
 
42
 
43
  if uploaded_file is not None:
44
  st.image(uploaded_file, caption="Uploaded Image", use_column_width=True)
45
+ st.write("Detecting...")
46
 
47
  # Load and preprocess the image
48
  processed_image = load_and_preprocess_image(uploaded_file)
 
54
  predicted_class_label = get_class_label(predicted_class_index)
55
 
56
  # Display the result
57
+ st.markdown(f"<h3 style='color: #4CAF50;'>The predicted class is: <strong>{predicted_class_label}</strong></h3>", unsafe_allow_html=True)