POLRAMBORA commited on
Commit
4801874
·
verified ·
1 Parent(s): a4fba61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -141,18 +141,11 @@ def render_message(history):
141
  return messages_html
142
 
143
  js = """
144
- document.addEventListener("DOMContentLoaded", function() {
145
- MathJax = {
146
- tex: {
147
- inlineMath: [['$', '$'], ['\\(', '\\)']],
148
- displayMath: [['$$', '$$'], ['\\[', '\\]']]
149
- },
150
- svg: {
151
- fontCache: 'global'
152
- }
153
- };
154
- MathJax.typeset(); // Process math expressions globally
155
- })
156
  """
157
 
158
  css="""
 
141
  return messages_html
142
 
143
  js = """
144
+ function processMath() {
145
+ if (typeof MathJax !== 'undefined') {
146
+ MathJax.typeset();
147
+ }
148
+ }
 
 
 
 
 
 
 
149
  """
150
 
151
  css="""