Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def respond(
|
|
45 |
|
46 |
def format_response(response: str) -> str:
|
47 |
"""Format the response with collapsible thinking sections"""
|
48 |
-
response = response.replace("<think>", '<details><summary>Show thinking 🧠</summary><div class="thoughts">')
|
49 |
response = response.replace("</think>", "</div></details>")
|
50 |
return response
|
51 |
|
@@ -54,14 +54,16 @@ css = """
|
|
54 |
.thoughts {
|
55 |
border: 1px solid #ccc;
|
56 |
padding: 10px;
|
57 |
-
background-color: #
|
|
|
58 |
border-radius: 5px;
|
59 |
margin: 5px 0;
|
60 |
}
|
61 |
details summary {
|
62 |
cursor: pointer;
|
63 |
padding: 5px;
|
64 |
-
background-color: #
|
|
|
65 |
border-radius: 5px;
|
66 |
font-weight: bold;
|
67 |
margin: 5px 0;
|
|
|
45 |
|
46 |
def format_response(response: str) -> str:
|
47 |
"""Format the response with collapsible thinking sections"""
|
48 |
+
response = response.replace("<think>", '<details open><summary>Show thinking 🧠</summary><div class="thoughts">')
|
49 |
response = response.replace("</think>", "</div></details>")
|
50 |
return response
|
51 |
|
|
|
54 |
.thoughts {
|
55 |
border: 1px solid #ccc;
|
56 |
padding: 10px;
|
57 |
+
background-color: #000000;
|
58 |
+
color: #ffffff;
|
59 |
border-radius: 5px;
|
60 |
margin: 5px 0;
|
61 |
}
|
62 |
details summary {
|
63 |
cursor: pointer;
|
64 |
padding: 5px;
|
65 |
+
background-color: #000000;
|
66 |
+
color: #ffffff;
|
67 |
border-radius: 5px;
|
68 |
font-weight: bold;
|
69 |
margin: 5px 0;
|