SaileshSivan commited on
Commit
4ea7492
·
1 Parent(s): 3b8077c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -152,7 +152,7 @@ if submit:
152
  # Display conversation history
153
  for message in st.session_state['flowmessages']:
154
  if isinstance(message, AIMessage):
155
- st.header("Doctor AI 🔊", divider=True)
156
  st.write(message.content)
157
  elif isinstance(message, HumanMessage):
158
  st.header(":blue[You]", divider=True)
@@ -166,13 +166,10 @@ if submit:
166
  response_format="mp3",
167
  speed=1.0
168
  )
169
-
170
  # Embed audio in the webpage without saving it
171
  st.header(':blue[Listen or Download] :loud_sound:')
172
-
173
- # Check if the "🔊" button is clicked
174
- if st.button("🔊 Play Audio"):
175
- st.audio(audio_response.content, format="audio/mp3", start_time=0)
176
 
177
 
178
 
 
152
  # Display conversation history
153
  for message in st.session_state['flowmessages']:
154
  if isinstance(message, AIMessage):
155
+ st.header("Doctor AI", divider=True)
156
  st.write(message.content)
157
  elif isinstance(message, HumanMessage):
158
  st.header(":blue[You]", divider=True)
 
166
  response_format="mp3",
167
  speed=1.0
168
  )
169
+
170
  # Embed audio in the webpage without saving it
171
  st.header(':blue[Listen or Download] :loud_sound:')
172
+ st.audio(audio_response.content,format="audio/wav",start_time=0)
 
 
 
173
 
174
 
175