raksama19 commited on
Commit
ed1238e
·
verified ·
1 Parent(s): d406389

Update gradio_pdf_app.py

Browse files
Files changed (1) hide show
  1. gradio_pdf_app.py +4 -1
gradio_pdf_app.py CHANGED
@@ -19,11 +19,14 @@ import io
19
  from utils.utils import *
20
  from utils.markdown_utils import MarkdownConverter
21
 
 
 
22
  try:
23
  from mdx_math import MathExtension
24
  MATH_EXTENSION_AVAILABLE = True
25
  except ImportError:
26
- MATH_EXTENSION_AVAILABLE = False
 
27
 
28
 
29
  class DOLPHIN:
 
19
  from utils.utils import *
20
  from utils.markdown_utils import MarkdownConverter
21
 
22
+ # Math extension is optional for enhanced math rendering
23
+ MATH_EXTENSION_AVAILABLE = False
24
  try:
25
  from mdx_math import MathExtension
26
  MATH_EXTENSION_AVAILABLE = True
27
  except ImportError:
28
+ # mdx_math is not available in standard PyPI, gracefully continue without it
29
+ pass
30
 
31
 
32
  class DOLPHIN: