dhhd255 commited on
Commit
1025740
·
1 Parent(s): 28f7df1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -31,20 +31,27 @@ st.markdown("""
31
  .parkinsons {
32
  color: #C30000;
33
  }
34
-
 
 
 
 
 
 
35
  </style>
36
  """, unsafe_allow_html=True)
37
 
38
  st.title("Parkinson's Disease Prediction")
39
 
40
  uploaded_file = st.file_uploader("Upload your :blue[Spiral] drawing here", type=["png", "jpg", "jpeg"])
 
41
  if uploaded_file is not None:
42
  col1, col2 = st.columns(2)
43
 
44
  # Load and resize the image
45
  image_size = (224, 224)
46
  new_image = Image.open(uploaded_file).convert('RGB').resize(image_size)
47
- col1.image(new_image, use_column_width=True)
48
  new_image = np.array(new_image)
49
  new_image = torch.from_numpy(new_image).transpose(0, 2).float().unsqueeze(0)
50
 
@@ -73,3 +80,8 @@ if uploaded_file is not None:
73
  col2.caption(f'{confidence*100:.0f}% sure')
74
 
75
  uploaded_file = st.file_uploader("Upload your :blue[Wave] drawing here", type=["png", "jpg", "jpeg"])
 
 
 
 
 
 
31
  .parkinsons {
32
  color: #C30000;
33
  }
34
+ .reportview-container .markdown-text-container {
35
+ display: flex;
36
+ justify-content: center;
37
+ }
38
+ .reportview-container .markdown-text-container a {
39
+ padding: 0 10px;
40
+ }
41
  </style>
42
  """, unsafe_allow_html=True)
43
 
44
  st.title("Parkinson's Disease Prediction")
45
 
46
  uploaded_file = st.file_uploader("Upload your :blue[Spiral] drawing here", type=["png", "jpg", "jpeg"])
47
+ st.empty()
48
  if uploaded_file is not None:
49
  col1, col2 = st.columns(2)
50
 
51
  # Load and resize the image
52
  image_size = (224, 224)
53
  new_image = Image.open(uploaded_file).convert('RGB').resize(image_size)
54
+ col1.image(new_image, width=255)
55
  new_image = np.array(new_image)
56
  new_image = torch.from_numpy(new_image).transpose(0, 2).float().unsqueeze(0)
57
 
 
80
  col2.caption(f'{confidence*100:.0f}% sure')
81
 
82
  uploaded_file = st.file_uploader("Upload your :blue[Wave] drawing here", type=["png", "jpg", "jpeg"])
83
+ st.empty()
84
+ st.divider()
85
+ st.write('[Twitter](https://twitter.com/your_twitter_handle)', unsafe_allow_html=True)
86
+ st.write('[Facebook](https://facebook.com/your_facebook_page)', unsafe_allow_html=True)
87
+ st.write('[Instagram](https://instagram.com/your_instagram_handle)', unsafe_allow_html=True)