alibicer commited on
Commit
8fd2c24
·
verified ·
1 Parent(s): e1fed1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
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
- # ✅ **Explicitly tell Gradio to use MathJax for LaTeX rendering**
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)
 
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)