czyoung commited on
Commit
22cc029
·
verified ·
1 Parent(s): ef55207

Correct streamlit file upload

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,10 +9,10 @@ st.title("Lecturer Support Tool")
9
 
10
  uploaded_file = st.file_uploader("Upload an audio of classroom activity to analyze")
11
 
12
- supported_file_types = ['.wav','.mp3','.mp4']
13
 
14
  if uploaded_file is not None:
15
- if not uploaded_file.name[0].endswith(supported_file_types):
16
  st.error('File must be of type: {}'.format(supported_file_types))
17
  uploaded_file = st.empty()
18
  else:
 
9
 
10
  uploaded_file = st.file_uploader("Upload an audio of classroom activity to analyze")
11
 
12
+ supported_file_types = ('.wav','.mp3','.mp4')
13
 
14
  if uploaded_file is not None:
15
+ if not uploaded_file.name.endswith(supported_file_types):
16
  st.error('File must be of type: {}'.format(supported_file_types))
17
  uploaded_file = st.empty()
18
  else: