cdleong commited on
Commit
9bc82fe
·
1 Parent(s): 73363ec

progress bar

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -103,11 +103,12 @@ if __name__ == "__main__":
103
 
104
  uploaded_files_count = len(uploaded_files)
105
  suppress_output_threshold = 2
106
- for uploaded_file in uploaded_files:
 
107
 
108
  if uploaded_file is not None:
109
  wav_file = get_path_to_wav_format(uploaded_file, uploaded_files_count>suppress_output_threshold)
110
  result = model.recognize(wav_file, langcode)
111
  results[uploaded_file.name] = result
112
-
113
  st.write(results)
 
103
 
104
  uploaded_files_count = len(uploaded_files)
105
  suppress_output_threshold = 2
106
+ my_bar = st.progress(0)
107
+ for i, uploaded_file in enumerate(uploaded_files):
108
 
109
  if uploaded_file is not None:
110
  wav_file = get_path_to_wav_format(uploaded_file, uploaded_files_count>suppress_output_threshold)
111
  result = model.recognize(wav_file, langcode)
112
  results[uploaded_file.name] = result
113
+ st.progress(i/uploaded_files_count)
114
  st.write(results)