Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -134,11 +134,21 @@ def render_message(history):
|
|
| 134 |
<div style='display: flex; align-items: center; margin-bottom: 10px;'>
|
| 135 |
<img src='{assistant_pic}' style='width: 40px; height: 40px; border-radius: 50%; margin-right: 10px;'>
|
| 136 |
<span style='color: white;'>{assistant_message_html}</span>
|
| 137 |
-
</div>
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
return messages_html
|
| 144 |
|
|
|
|
| 134 |
<div style='display: flex; align-items: center; margin-bottom: 10px;'>
|
| 135 |
<img src='{assistant_pic}' style='width: 40px; height: 40px; border-radius: 50%; margin-right: 10px;'>
|
| 136 |
<span style='color: white;'>{assistant_message_html}</span>
|
| 137 |
+
</div>"""
|
| 138 |
+
|
| 139 |
+
messages_html += """
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
<script>
|
| 143 |
+
// Trigger MathJax rendering
|
| 144 |
+
function processMath() {
|
| 145 |
+
if (typeof MathJax !== 'undefined') {
|
| 146 |
+
MathJax.typeset();
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
processMath();
|
| 150 |
+
</script>
|
| 151 |
+
"""
|
| 152 |
|
| 153 |
return messages_html
|
| 154 |
|