When initializing PdfConverter, an AttributeError occurs if config is None because get() is called on a NoneType object.
Error:
File "/home/siddarth/test/marker/test_marker.py", line 65, in process_pdfs_in_folder
converter = PdfConverter(artifact_dict=create_model_dict())
File "/home/siddarth/.local/lib/python3.10/site-packages/marker/converters/pdf.py", line 118, in __init__
elif config.get("use_llm", False):
AttributeError: 'NoneType' object has no attribute 'get'
Modify line 118 to check if config is not None before calling .get():
elif config is not None and config.get("use_llm", False):
This ensures that config.get("use_llm", False) is only accessed if config is a valid dictionary.