Update app.py
Browse files
app.py
CHANGED
|
@@ -209,16 +209,14 @@ if uploaded_file:
|
|
| 209 |
st.write("**AI:**", entry["response"])
|
| 210 |
|
| 211 |
# Convert diagnosis to speech if enabled
|
| 212 |
-
|
| 213 |
|
| 214 |
if tts_enabled:
|
| 215 |
-
if st.button("π Listen
|
| 216 |
-
with st.spinner("Generating audio..."):
|
| 217 |
-
audio_bytes = text_to_speech(
|
| 218 |
if audio_bytes:
|
| 219 |
-
st.audio(audio_bytes, format=
|
| 220 |
-
|
| 221 |
-
|
| 222 |
else:
|
| 223 |
st.write("β
No high-confidence diseases detected.")
|
| 224 |
|
|
|
|
| 209 |
st.write("**AI:**", entry["response"])
|
| 210 |
|
| 211 |
# Convert diagnosis to speech if enabled
|
| 212 |
+
|
| 213 |
|
| 214 |
if tts_enabled:
|
| 215 |
+
if st.button("π Listen to Diagnosis"):
|
| 216 |
+
with st.spinner("Generating audio... π΅"):
|
| 217 |
+
audio_bytes = text_to_speech(diagnosis, language)
|
| 218 |
if audio_bytes:
|
| 219 |
+
st.audio(audio_bytes, format="audio/mp3")
|
|
|
|
|
|
|
| 220 |
else:
|
| 221 |
st.write("β
No high-confidence diseases detected.")
|
| 222 |
|