Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -139,19 +139,25 @@ def render_message(history):
|
|
139 |
messages_html += """
|
140 |
</div>
|
141 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
<script>
|
143 |
-
|
144 |
-
function processMath() {
|
145 |
if (typeof MathJax !== 'undefined') {
|
146 |
MathJax.typeset();
|
147 |
}
|
148 |
-
}
|
149 |
-
processMath();
|
150 |
</script>
|
151 |
"""
|
152 |
|
153 |
return messages_html
|
154 |
|
|
|
155 |
js = """
|
156 |
function processMath() {
|
157 |
if (typeof MathJax !== 'undefined') {
|
|
|
139 |
messages_html += """
|
140 |
</div>
|
141 |
</div>
|
142 |
+
|
143 |
+
<!-- MathJax Script -->
|
144 |
+
<script type="text/javascript" id="MathJax-script" async
|
145 |
+
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js">
|
146 |
+
</script>
|
147 |
+
|
148 |
+
<!-- Trigger MathJax Typeset -->
|
149 |
<script>
|
150 |
+
document.addEventListener("DOMContentLoaded", function() {
|
|
|
151 |
if (typeof MathJax !== 'undefined') {
|
152 |
MathJax.typeset();
|
153 |
}
|
154 |
+
});
|
|
|
155 |
</script>
|
156 |
"""
|
157 |
|
158 |
return messages_html
|
159 |
|
160 |
+
|
161 |
js = """
|
162 |
function processMath() {
|
163 |
if (typeof MathJax !== 'undefined') {
|