akhaliq HF staff commited on
Commit
7841139
1 Parent(s): a041a8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -81,18 +81,18 @@ def format_steps(steps, total_time):
81
  html_content = ""
82
  for title, content, thinking_time in steps:
83
  if title == "Final Answer":
84
- html_content += f"<h3>{title}</h3>"
85
- html_content += f"<p>{content.replace('\n', '<br>')}</p>"
86
  else:
87
- html_content += f"""
88
  <details>
89
- <summary><strong>{title}</strong></summary>
90
- <p>{content.replace('\n', '<br>')}</p>
91
- <p><em>Thinking time for this step: {thinking_time:.2f} seconds</em></p>
92
  </details>
93
  <br>
94
- """
95
- html_content += f"<strong>Total thinking time: {total_time:.2f} seconds</strong>"
96
  return html_content
97
 
98
  def main(user_query):
 
81
  html_content = ""
82
  for title, content, thinking_time in steps:
83
  if title == "Final Answer":
84
+ html_content += "<h3>{}</h3>".format(title)
85
+ html_content += "<p>{}</p>".format(content.replace('\n', '<br>'))
86
  else:
87
+ html_content += """
88
  <details>
89
+ <summary><strong>{}</strong></summary>
90
+ <p>{}</p>
91
+ <p><em>Thinking time for this step: {:.2f} seconds</em></p>
92
  </details>
93
  <br>
94
+ """.format(title, content.replace('\n', '<br>'), thinking_time)
95
+ html_content += "<strong>Total thinking time: {:.2f} seconds</strong>".format(total_time)
96
  return html_content
97
 
98
  def main(user_query):