WilliamGazeley commited on
Commit
33e451f
·
1 Parent(s): c9d6063

Prevent LaTeX rendering

Browse files
Files changed (1) hide show
  1. src/app.py +2 -1
src/app.py CHANGED
@@ -120,13 +120,14 @@ def main():
120
  if depth < 5:
121
  return get_response(input_text, depth + 1)
122
 
123
- if st.button("Generate"):
124
  start = time()
125
  if input_text:
126
  with st.status("Generating response...") as status:
127
  config.status = status
128
  config.status.update(label=":question: Breaking down question")
129
  response = get_response(input_text)
 
130
  st.info(response)
131
  config.status.update(label=f"Finished! ({time() - start:.2f}s)", state="complete", expanded=True)
132
  else:
 
120
  if depth < 5:
121
  return get_response(input_text, depth + 1)
122
 
123
+ if st.button("Generate") or input_text:
124
  start = time()
125
  if input_text:
126
  with st.status("Generating response...") as status:
127
  config.status = status
128
  config.status.update(label=":question: Breaking down question")
129
  response = get_response(input_text)
130
+ response = response.replace("$", "\$") # Escape $ to avoid LaTeX rendering
131
  st.info(response)
132
  config.status.update(label=f"Finished! ({time() - start:.2f}s)", state="complete", expanded=True)
133
  else: