update
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ def respond(
|
|
88 |
continue
|
89 |
if current_response:
|
90 |
if '<think>' in current_response:
|
91 |
-
current_response = current_response.replace('<think>', '<details><summary>Thinking</summary>\n\n```')
|
92 |
if '</think>' in current_response:
|
93 |
current_response = current_response.replace('</think>', '```\n\n</details>')
|
94 |
if '**Final Answer**' in current_response:
|
@@ -96,7 +96,7 @@ def respond(
|
|
96 |
|
97 |
formatted_response = current_response
|
98 |
formatted_response = formatted_response.replace('<', '<').replace('>', '>')
|
99 |
-
formatted_response = formatted_response.replace('<details>', '<details>')
|
100 |
formatted_response = formatted_response.replace('</details>', '</details>')
|
101 |
formatted_response = formatted_response.replace('<summary>', '<summary>')
|
102 |
formatted_response = formatted_response.replace('</summary>', '</summary>')
|
@@ -151,22 +151,17 @@ demo = gr.ChatInterface(
|
|
151 |
.prose p {
|
152 |
margin-top: 1.5em !important;
|
153 |
}
|
154 |
-
.
|
155 |
-
margin:
|
156 |
-
border:
|
157 |
-
border-radius: 6px !important;
|
158 |
}
|
159 |
-
.
|
160 |
-
|
161 |
-
|
162 |
cursor: pointer !important;
|
163 |
-
border-radius: 6px 6px 0 0 !important;
|
164 |
}
|
165 |
-
.
|
166 |
-
|
167 |
-
}
|
168 |
-
.prose details[open] summary {
|
169 |
-
border-bottom: 1px solid #e5e7eb !important;
|
170 |
}
|
171 |
"""
|
172 |
)
|
|
|
88 |
continue
|
89 |
if current_response:
|
90 |
if '<think>' in current_response:
|
91 |
+
current_response = current_response.replace('<think>', '<details open><summary>Thinking</summary>\n\n```')
|
92 |
if '</think>' in current_response:
|
93 |
current_response = current_response.replace('</think>', '```\n\n</details>')
|
94 |
if '**Final Answer**' in current_response:
|
|
|
96 |
|
97 |
formatted_response = current_response
|
98 |
formatted_response = formatted_response.replace('<', '<').replace('>', '>')
|
99 |
+
formatted_response = formatted_response.replace('<details open>', '<details open>')
|
100 |
formatted_response = formatted_response.replace('</details>', '</details>')
|
101 |
formatted_response = formatted_response.replace('<summary>', '<summary>')
|
102 |
formatted_response = formatted_response.replace('</summary>', '</summary>')
|
|
|
151 |
.prose p {
|
152 |
margin-top: 1.5em !important;
|
153 |
}
|
154 |
+
.accordion {
|
155 |
+
margin: 0 !important;
|
156 |
+
border: none !important;
|
|
|
157 |
}
|
158 |
+
.accordion-header {
|
159 |
+
background: #f0f0f0 !important;
|
160 |
+
padding: 8px !important;
|
161 |
cursor: pointer !important;
|
|
|
162 |
}
|
163 |
+
.accordion-content {
|
164 |
+
padding: 8px !important;
|
|
|
|
|
|
|
165 |
}
|
166 |
"""
|
167 |
)
|