Forráskód Böngészése

Merge pull request #2450 from myhloli/dev

fix(requirements): update pdfminer.six version and restrict torch version upper limit
Xiaomeng Zhao 6 hónapja
szülő
commit
cd785f6af8

+ 1 - 1
magic_pdf/model/sub_modules/mfr/unimernet/unimernet_hf/modeling_unimernet.py

@@ -334,7 +334,7 @@ def fix_latex_environments(s):
 
 UP_PATTERN = re.compile(r'\\up([a-zA-Z]+)')
 COMMANDS_TO_REMOVE_PATTERN = re.compile(
-    r'\\(?:lefteqn|boldmath|ensuremath|centering|textsubscript|sides|textsl|textcent|emph|protect)')
+    r'\\(?:lefteqn|boldmath|ensuremath|centering|textsubscript|sides|textsl|textcent|emph|protect|null)')
 REPLACEMENTS_PATTERNS = {
     re.compile(r'\\underbar'): r'\\underline',
     re.compile(r'\\Bar'): r'\\hat',

+ 2 - 2
requirements.txt

@@ -7,9 +7,9 @@ numpy>=1.21.6
 pydantic>=2.7.2,<2.11
 PyMuPDF>=1.24.9,<1.25.0
 scikit-learn>=1.0.2
-torch>=2.2.2,!=2.5.0,!=2.5.1
+torch>=2.2.2,!=2.5.0,!=2.5.1,<3
 torchvision
 transformers>=4.49.0,!=4.51.0,<5.0.0
-pdfminer.six==20250324
+pdfminer.six==20250506
 tqdm>=4.67.1
 # The requirements.txt must ensure that only necessary external dependencies are introduced. If there are new dependencies to add, please contact the project administrator.