Update mdr_pdf_parser.py
Browse files- mdr_pdf_parser.py +4 -0
mdr_pdf_parser.py
CHANGED
@@ -69,6 +69,10 @@ try:
|
|
69 |
except ImportError:
|
70 |
print("Warning: Could not import build_model from struct_eqtable. Table parsing might fail.")
|
71 |
|
|
|
|
|
|
|
|
|
72 |
# --- MagicDataReadiness Core Components ---
|
73 |
|
74 |
# --- MDR Utilities ---
|
|
|
69 |
except ImportError:
|
70 |
print("Warning: Could not import build_model from struct_eqtable. Table parsing might fail.")
|
71 |
|
72 |
+
import torch
|
73 |
+
if not hasattr(torch, "get_default_device"):
|
74 |
+
torch.get_default_device = lambda: torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
75 |
+
|
76 |
# --- MagicDataReadiness Core Components ---
|
77 |
|
78 |
# --- MDR Utilities ---
|