Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -118,15 +118,14 @@ try:
|
|
118 |
|
119 |
# 在 Streamlit 中播放音频
|
120 |
st.audio(audio_file_path, format="audio/mp3")
|
121 |
-
|
122 |
-
# 提供下载按钮
|
123 |
-
with open(audio_file_path, "rb") as audio_file:
|
124 |
-
st.download_button(
|
125 |
-
label="Download Braille Audio",
|
126 |
-
data=audio_file,
|
127 |
-
file_name="detected_braille.mp3",
|
128 |
-
mime="audio/mp3",
|
129 |
-
)
|
130 |
-
|
131 |
except Exception as ex:
|
132 |
-
st.write("An error occurred while processing the audio.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
# 在 Streamlit 中播放音频
|
120 |
st.audio(audio_file_path, format="audio/mp3")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
except Exception as ex:
|
122 |
+
st.write("An error occurred while processing the audio.")
|
123 |
+
|
124 |
+
# 提供下载按钮
|
125 |
+
with open(audio_file_path, "rb") as audio_file:
|
126 |
+
st.download_button(
|
127 |
+
label="Download Braille Audio",
|
128 |
+
data=audio_file,
|
129 |
+
file_name="detected_braille.mp3",
|
130 |
+
mime="audio/mp3",
|
131 |
+
)
|