shamimjony1000 commited on
Commit
f1fd2ca
·
verified ·
1 Parent(s): 47dc6e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py CHANGED
@@ -36,6 +36,26 @@ def main():
36
 
37
  st.markdown(f"<div style='text-align: center; font-size: 30px;'>Predicted Alzheimer's stage is: <b>{class_names[predicted_class]}</b></div>", unsafe_allow_html=True)
38
  st.image(uploaded_file, use_column_width=False, width=300)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  if __name__ == '__main__':
41
  main()
 
36
 
37
  st.markdown(f"<div style='text-align: center; font-size: 30px;'>Predicted Alzheimer's stage is: <b>{class_names[predicted_class]}</b></div>", unsafe_allow_html=True)
38
  st.image(uploaded_file, use_column_width=False, width=300)
39
+ else:
40
+ # Display four example images if no image is uploaded
41
+ example_images = ["mild_468_0_4983.jpg", "moderate_2_0_72.jpg", "non_61.jpg", "verymild_37_0_2606.jpg"]
42
+ col1, col2, col3, col4 = st.columns(4)
43
+
44
+ with col1:
45
+ image1 = Image.open(example_images[0])
46
+ st.image(image1, caption="Example 1", use_column_width=True)
47
+
48
+ with col2:
49
+ image2 = Image.open(example_images[1])
50
+ st.image(image2, caption="Example 2", use_column_width=True)
51
+
52
+ with col3:
53
+ image3 = Image.open(example_images[2])
54
+ st.image(image3, caption="Example 3", use_column_width=True)
55
+
56
+ with col4:
57
+ image4 = Image.open(example_images[3])
58
+ st.image(image4, caption="Example 4", use_column_width=True)
59
 
60
  if __name__ == '__main__':
61
  main()