Skip to content

Commit 474d5c4

Browse files
authored
Update app.py
1 parent e6d9526 commit 474d5c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ def main():
125125
with st.chat_message("assistant"):
126126
with st.spinner("Generating..."):
127127
response = llm_chain.invoke({"input": prompt})
128-
st.markdown(response)
128+
index = response.find("```")
129+
if index != -1:
130+
st.markdown(response[index:])
131+
else:
132+
st.markdown(response)
129133
message = {
130134
"role": "assistant",
131135
"content": response,

0 commit comments

Comments
 (0)