Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,17 +9,8 @@ client = InferenceClient()
|
|
9 |
|
10 |
|
11 |
def render_latex(latex_input):
|
12 |
-
rendered_html = f"""<
|
13 |
-
|
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 |
|