SaileshSivan commited on
Commit
aebfac0
·
1 Parent(s): 7199219

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -3,7 +3,7 @@ import time
3
  from langchain.schema import HumanMessage, SystemMessage, AIMessage
4
  from langchain.chat_models import ChatOpenAI
5
  import openai
6
- import base64
7
 
8
 
9
  def get_chatmodel_response(question):
@@ -92,8 +92,11 @@ if submit:
92
  input=response
93
  )
94
 
95
- # Embed audio in the webpage without saving it
96
- st.audio(audio_response.content, format="audio/mp3")
 
 
 
97
 
98
 
99
 
 
3
  from langchain.schema import HumanMessage, SystemMessage, AIMessage
4
  from langchain.chat_models import ChatOpenAI
5
  import openai
6
+ from IPython.display import Audio
7
 
8
 
9
  def get_chatmodel_response(question):
 
92
  input=response
93
  )
94
 
95
+ # # Embed audio in the webpage without saving it
96
+ # st.audio(audio_response.content, format="audio/mp3")
97
+
98
+ # Play audio automatically
99
+ Audio(audio_response.content, rate=44100)
100
 
101
 
102