mistermprah commited on
Commit
9478f66
1 Parent(s): 87bda88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -44
app.py CHANGED
@@ -20,7 +20,7 @@ def classify_audio(filepath):
20
  label = "normal"
21
  elif "extrasystole" in label:
22
  label = "normal"
23
- elif "normal" in label:
24
  label = "normal"
25
  outputs[label] = p["score"]
26
  return outputs
@@ -31,7 +31,7 @@ st.title("Heartbeat Sound Classification")
31
  # Theme selection
32
  theme = st.sidebar.selectbox(
33
  "Select Theme",
34
- ["Light Green", "Light Blue", "Dark Green", "Dark Blue"]
35
  )
36
 
37
  # Add custom CSS for styling based on the selected theme
@@ -77,48 +77,7 @@ elif theme == "Light Blue":
77
  """,
78
  unsafe_allow_html=True
79
  )
80
- elif theme == "Dark Green":
81
- st.markdown(
82
- """
83
- <style>
84
- body, .stApp {
85
- background-color: #1b5e20; /* Dark green background */
86
- }
87
- .stApp {
88
- color: #a5d6a7; /* Light green text */
89
- }
90
- .stButton > button, .stFileUpload > div {
91
- background-color: #004d40; /* Dark green button and file uploader background */
92
- color: white; /* White text */
93
- }
94
- .stButton > button:hover, .stFileUpload > div:hover {
95
- background-color: #00332c; /* Darker green on hover */
96
- }
97
- </style>
98
- """,
99
- unsafe_allow_html=True
100
- )
101
- elif theme == "Dark Blue":
102
- st.markdown(
103
- """
104
- <style>
105
- body, .stApp {
106
- background-color: #0d47a1; /* Dark blue background */
107
- }
108
- .stApp {
109
- color: #bbdefb; /* Light blue text */
110
- }
111
- .stButton > button, .stFileUpload > div {
112
- background-color: #006064; /* Dark blue button and file uploader background */
113
- color: white; /* White text */
114
- }
115
- .stButton > button:hover, .stFileUpload > div:hover {
116
- background-color: #004d40; /* Darker blue on hover */
117
- }
118
- </style>
119
- """,
120
- unsafe_allow_html=True
121
- )
122
 
123
  # File uploader for audio files
124
  uploaded_file = st.file_uploader("Upload an audio file", type=["wav", "mp3"])
 
20
  label = "normal"
21
  elif "extrasystole" in label:
22
  label = "normal"
23
+ elif "Normal" in label:
24
  label = "normal"
25
  outputs[label] = p["score"]
26
  return outputs
 
31
  # Theme selection
32
  theme = st.sidebar.selectbox(
33
  "Select Theme",
34
+ ["Light Green", "Light Blue"]
35
  )
36
 
37
  # Add custom CSS for styling based on the selected theme
 
77
  """,
78
  unsafe_allow_html=True
79
  )
80
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  # File uploader for audio files
83
  uploaded_file = st.file_uploader("Upload an audio file", type=["wav", "mp3"])