Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,6 +34,7 @@ def respond(user_message, history):
|
|
| 34 |
|
| 35 |
return "", history
|
| 36 |
|
|
|
|
| 37 |
with gr.Blocks() as demo:
|
| 38 |
gr.Markdown("## AI-Guided Math PD Chatbot")
|
| 39 |
chatbot = gr.Chatbot(height=500)
|
|
@@ -52,16 +53,15 @@ with gr.Blocks() as demo:
|
|
| 52 |
outputs=[state_history]
|
| 53 |
)
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
)
|
| 65 |
|
| 66 |
if __name__ == "__main__":
|
| 67 |
demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|
|
|
|
| 34 |
|
| 35 |
return "", history
|
| 36 |
|
| 37 |
+
# ✅ **Explicitly tell Gradio to use MathJax for LaTeX rendering**
|
| 38 |
with gr.Blocks() as demo:
|
| 39 |
gr.Markdown("## AI-Guided Math PD Chatbot")
|
| 40 |
chatbot = gr.Chatbot(height=500)
|
|
|
|
| 53 |
outputs=[state_history]
|
| 54 |
)
|
| 55 |
|
| 56 |
+
gr.Markdown(
|
| 57 |
+
r"""
|
| 58 |
+
<script type="text/javascript">
|
| 59 |
+
MathJax = {
|
| 60 |
+
tex: { inlineMath: [['$', '$'], ['\\(', '\\)']] }
|
| 61 |
+
};
|
| 62 |
+
</script>
|
| 63 |
+
"""
|
| 64 |
+
)
|
|
|
|
| 65 |
|
| 66 |
if __name__ == "__main__":
|
| 67 |
demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|