Update app.py
Browse files
app.py
CHANGED
@@ -42,10 +42,20 @@ def respond(
|
|
42 |
|
43 |
# Gradio ChatInterface setup with MathJax
|
44 |
mathjax_script = """
|
45 |
-
<
|
46 |
-
<script
|
47 |
-
<script
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
"""
|
50 |
demo = gr.ChatInterface(
|
51 |
respond,
|
|
|
42 |
|
43 |
# Gradio ChatInterface setup with MathJax
|
44 |
mathjax_script = """
|
45 |
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
46 |
+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
47 |
+
<script>
|
48 |
+
document.addEventListener('DOMContentLoaded', function() {
|
49 |
+
MathJax = {
|
50 |
+
tex: {
|
51 |
+
inlineMath: [['$', '$'], ['\$$', '\\)']]
|
52 |
+
},
|
53 |
+
svg: {
|
54 |
+
fontCache: 'global'
|
55 |
+
}
|
56 |
+
};
|
57 |
+
});
|
58 |
+
</script>
|
59 |
"""
|
60 |
demo = gr.ChatInterface(
|
61 |
respond,
|