Spaces:
Runtime error
Runtime error
show results as a dictionary
Browse files
app.py
CHANGED
|
@@ -90,6 +90,7 @@ if __name__ == "__main__":
|
|
| 90 |
accept_multiple_files=True,
|
| 91 |
)
|
| 92 |
|
|
|
|
| 93 |
for uploaded_file in uploaded_files:
|
| 94 |
|
| 95 |
if uploaded_file is not None:
|
|
@@ -99,8 +100,9 @@ if __name__ == "__main__":
|
|
| 99 |
st.audio(uploaded_file, format='audio/wav')
|
| 100 |
|
| 101 |
wav_file = get_path_to_wav_format(uploaded_file)
|
| 102 |
-
st.write(wav_file)
|
| 103 |
result = model.recognize(wav_file, langcode)
|
| 104 |
-
|
|
|
|
| 105 |
|
| 106 |
-
|
|
|
|
| 90 |
accept_multiple_files=True,
|
| 91 |
)
|
| 92 |
|
| 93 |
+
results = {} # for better download/display
|
| 94 |
for uploaded_file in uploaded_files:
|
| 95 |
|
| 96 |
if uploaded_file is not None:
|
|
|
|
| 100 |
st.audio(uploaded_file, format='audio/wav')
|
| 101 |
|
| 102 |
wav_file = get_path_to_wav_format(uploaded_file)
|
| 103 |
+
# st.write(wav_file)
|
| 104 |
result = model.recognize(wav_file, langcode)
|
| 105 |
+
results[wav_file] = result
|
| 106 |
+
# st.write(result)
|
| 107 |
|
| 108 |
+
st.write(results)
|