Spaces:
Sleeping
Sleeping
Commit
·
5843231
1
Parent(s):
0e0e18b
Update app.py
Browse files
app.py
CHANGED
|
@@ -108,15 +108,15 @@ button_css = """.stButton>button {
|
|
| 108 |
}"""
|
| 109 |
st.markdown(f'<style>{button_css}</style>', unsafe_allow_html=True)
|
| 110 |
|
| 111 |
-
def genvoice(text):
|
| 112 |
-
|
| 113 |
-
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
|
| 121 |
|
| 122 |
# voice.generate_and_play_audio(text, playInBackground=False , model="")
|
|
@@ -227,7 +227,7 @@ if prompt := st.chat_input():
|
|
| 227 |
tags=[lesson_selection, lesson_type]
|
| 228 |
)
|
| 229 |
my_text = response[chain.output_key]
|
| 230 |
-
genvoice(my_text)
|
| 231 |
st.session_state.messages.append(HumanMessage(content=prompt))
|
| 232 |
st.session_state.messages.append(AIMessage(content=my_text))
|
| 233 |
|
|
|
|
| 108 |
}"""
|
| 109 |
st.markdown(f'<style>{button_css}</style>', unsafe_allow_html=True)
|
| 110 |
|
| 111 |
+
# def genvoice(text):
|
| 112 |
+
# text = text.replace("```", "")
|
| 113 |
+
# text = text.replace("**", "")
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
+
# audio = generate(text, voice="Bella", model="eleven_monolingual_v1")
|
| 118 |
+
# # IPython.display.Audio(audio)
|
| 119 |
+
# play(audio)
|
| 120 |
|
| 121 |
|
| 122 |
# voice.generate_and_play_audio(text, playInBackground=False , model="")
|
|
|
|
| 227 |
tags=[lesson_selection, lesson_type]
|
| 228 |
)
|
| 229 |
my_text = response[chain.output_key]
|
| 230 |
+
# genvoice(my_text)
|
| 231 |
st.session_state.messages.append(HumanMessage(content=prompt))
|
| 232 |
st.session_state.messages.append(AIMessage(content=my_text))
|
| 233 |
|