dhhd255 commited on
Commit
3be0091
·
1 Parent(s): f143c99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -14,13 +14,17 @@ model = AutoModel.from_pretrained('dhhd255/parkinsons_pred0.1')
14
  # Move the model to the device
15
  model = model.to(device)
16
 
17
- # Add custom CSS to use the Inter font and define custom classes for healthy and parkinsons results
18
  st.markdown("""
19
  <style>
20
  @import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
21
  body {
22
  font-family: 'Inter', sans-serif;
23
  }
 
 
 
 
24
  .healthy {
25
  color: #007E3F;
26
  }
@@ -60,6 +64,6 @@ if uploaded_file is not None:
60
  logits = feature_reducer(logits)
61
  predicted_class = torch.argmax(logits, dim=1).item()
62
  if(predicted_class == 0):
63
- col2.markdown('<span class="parkinsons">Predicted class: Parkinson\'s</span>', unsafe_allow_html=True)
64
  else:
65
- col2.markdown('<span class="healthy">Predicted class: Healthy</span>', unsafe_allow_html=True)
 
14
  # Move the model to the device
15
  model = model.to(device)
16
 
17
+ # Add custom CSS to use the Inter font, define custom classes for healthy and parkinsons results, and increase the font size and make the text bold
18
  st.markdown("""
19
  <style>
20
  @import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
21
  body {
22
  font-family: 'Inter', sans-serif;
23
  }
24
+ .result {
25
+ font-size: 24px;
26
+ font-weight: bold;
27
+ }
28
  .healthy {
29
  color: #007E3F;
30
  }
 
64
  logits = feature_reducer(logits)
65
  predicted_class = torch.argmax(logits, dim=1).item()
66
  if(predicted_class == 0):
67
+ col2.markdown('<span class="result parkinsons">Predicted class: Parkinson\'s</span>', unsafe_allow_html=True)
68
  else:
69
+ col2.markdown('<span class="result healthy">Predicted class: Healthy</span>', unsafe_allow_html=True)