Spaces:
Sleeping
Sleeping
Commit
β’
39b53a1
1
Parent(s):
d498f92
Update app.py
Browse files
app.py
CHANGED
@@ -86,13 +86,13 @@ if wav_audio_data != None:
|
|
86 |
|
87 |
st.write("Transcribed Given Audio β")
|
88 |
|
89 |
-
st.chat_message("human",avatar = "
|
90 |
st.session_state.messages.append({"role": "human", "content": prompt})
|
91 |
|
92 |
# transcribe audio
|
93 |
response = predict(message= prompt)
|
94 |
|
95 |
-
with st.chat_message("assistant", avatar='
|
96 |
st.markdown(response)
|
97 |
# Add assistant response to chat history
|
98 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
@@ -100,13 +100,13 @@ if wav_audio_data != None:
|
|
100 |
# React to user input
|
101 |
if prompt := textinput:
|
102 |
# Display user message in chat message container
|
103 |
-
st.chat_message("human",avatar = "
|
104 |
# Add user message to chat history
|
105 |
st.session_state.messages.append({"role": "human", "content": prompt})
|
106 |
|
107 |
response = predict(message=prompt)#, temperature= temperatureSide,max_new_tokens=max_new_tokensSide, Topp=ToppSide,Repetitionpenalty=RepetitionpenaltySide)
|
108 |
# Display assistant response in chat message container
|
109 |
-
with st.chat_message("assistant", avatar='
|
110 |
st.markdown(response)
|
111 |
# Add assistant response to chat history
|
112 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
|
|
86 |
|
87 |
st.write("Transcribed Given Audio β")
|
88 |
|
89 |
+
st.chat_message("human",avatar = "πΏ").markdown(prompt)
|
90 |
st.session_state.messages.append({"role": "human", "content": prompt})
|
91 |
|
92 |
# transcribe audio
|
93 |
response = predict(message= prompt)
|
94 |
|
95 |
+
with st.chat_message("assistant", avatar='πΏ'):
|
96 |
st.markdown(response)
|
97 |
# Add assistant response to chat history
|
98 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
|
|
100 |
# React to user input
|
101 |
if prompt := textinput:
|
102 |
# Display user message in chat message container
|
103 |
+
st.chat_message("human",avatar = "πΏ").markdown(prompt)
|
104 |
# Add user message to chat history
|
105 |
st.session_state.messages.append({"role": "human", "content": prompt})
|
106 |
|
107 |
response = predict(message=prompt)#, temperature= temperatureSide,max_new_tokens=max_new_tokensSide, Topp=ToppSide,Repetitionpenalty=RepetitionpenaltySide)
|
108 |
# Display assistant response in chat message container
|
109 |
+
with st.chat_message("assistant", avatar='πΏ'):
|
110 |
st.markdown(response)
|
111 |
# Add assistant response to chat history
|
112 |
st.session_state.messages.append({"role": "assistant", "content": response})
|