update
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def respond(
|
|
69 |
|
70 |
if len(current_response) > 16:
|
71 |
if '<think>' in current_response:
|
72 |
-
current_response = current_response.replace('<think>', '<details open><summary
|
73 |
if '</think>' in current_response:
|
74 |
current_response = current_response.replace('</think>', '```\n\n</details>')
|
75 |
if '**Final Answer**' in current_response:
|
@@ -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
|
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
|
100 |
formatted_response = formatted_response.replace('</details>', '</details>')
|
101 |
formatted_response = formatted_response.replace('<summary>', '<summary>')
|
102 |
formatted_response = formatted_response.replace('</summary>', '</summary>')
|
@@ -134,6 +134,7 @@ demo = gr.ChatInterface(
|
|
134 |
word-wrap: break-word !important;
|
135 |
overflow-wrap: break-word !important;
|
136 |
max-width: 100% !important;
|
|
|
137 |
}
|
138 |
.prose code {
|
139 |
white-space: pre-wrap !important;
|
@@ -147,6 +148,9 @@ demo = gr.ChatInterface(
|
|
147 |
overflow-wrap: break-word !important;
|
148 |
max-width: 100% !important;
|
149 |
}
|
|
|
|
|
|
|
150 |
.accordion {
|
151 |
margin: 0 !important;
|
152 |
border: none !important;
|
|
|
69 |
|
70 |
if len(current_response) > 16:
|
71 |
if '<think>' in current_response:
|
72 |
+
current_response = current_response.replace('<think>', '<details open><summary>Thinking</summary>\n\n```')
|
73 |
if '</think>' in current_response:
|
74 |
current_response = current_response.replace('</think>', '```\n\n</details>')
|
75 |
if '**Final Answer**' in current_response:
|
|
|
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 |
|
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>')
|
|
|
134 |
word-wrap: break-word !important;
|
135 |
overflow-wrap: break-word !important;
|
136 |
max-width: 100% !important;
|
137 |
+
margin-bottom: 1.5em !important;
|
138 |
}
|
139 |
.prose code {
|
140 |
white-space: pre-wrap !important;
|
|
|
148 |
overflow-wrap: break-word !important;
|
149 |
max-width: 100% !important;
|
150 |
}
|
151 |
+
.prose p {
|
152 |
+
margin-top: 1.5em !important;
|
153 |
+
}
|
154 |
.accordion {
|
155 |
margin: 0 !important;
|
156 |
border: none !important;
|