yasserrmd commited on
Commit
c01b31d
·
verified ·
1 Parent(s): 804de57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -11
app.py CHANGED
@@ -9,17 +9,8 @@ client = InferenceClient()
9
 
10
 
11
  def render_latex(latex_input):
12
- rendered_html = f"""<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css">
13
- <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"></script>
14
- <div id="math" style="font-size: 1.5em; margin: 10px;">
15
- <script>
16
- document.addEventListener('DOMContentLoaded', function() {{
17
- katex.render(String.raw`{latex_input}`, document.getElementById('math'), {{
18
- throwOnError: false
19
- }});
20
- }});
21
- </script>
22
- </div>"""
23
  return f"{rendered_html}"
24
 
25
 
 
9
 
10
 
11
  def render_latex(latex_input):
12
+ rendered_html = f"""<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
13
+ {latex_input}"""
 
 
 
 
 
 
 
 
 
14
  return f"{rendered_html}"
15
 
16