Update app.py
Browse files
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 +=
|
85 |
-
html_content +=
|
86 |
else:
|
87 |
-
html_content +=
|
88 |
<details>
|
89 |
-
<summary><strong>{
|
90 |
-
<p>{
|
91 |
-
<p><em>Thinking time for this step: {
|
92 |
</details>
|
93 |
<br>
|
94 |
-
"""
|
95 |
-
html_content +=
|
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):
|