VikParuchuri / marker

Convert PDF to markdown quickly with high accuracy
https://www.datalab.to
GNU General Public License v3.0
14.15k stars 720 forks source link

How to change settings when installed via pip? #162

Open EliasPereirah opened 1 month ago

EliasPereirah commented 1 month ago

readme.md says: Inspect the settings in marker/settings.py. You can override any settings with environment variables. But how can I find the marker/settings.py file or is this only valid for download via git? Sorry, noob question, I don't have much experience with Python

huangh12 commented 4 weeks ago

I am also puzzled by this..

gmotta commented 3 weeks ago

A command similar to: pip show marker-pdf

Should give you what you are looking for:

In my case:

@ markerexperiments % python3 -m pip show marker-pdf Name: marker-pdf Version: 0.2.6 Summary: Convert PDF to markdown with high speed and accuracy. Home-page: https://github.com/VikParuchuri/marker Author: Vik Paruchuri Author-email: github@vikas.sh License: GPL-3.0-or-later Location: /Users//.pyenv/versions/3.9.19/lib/python3.9/site-packages Requires: filetype, ftfy, grpcio, numpy, pdftext, Pillow, pydantic, pydantic-settings, python-dotenv, rapidfuzz, ray, regex, scikit-learn, surya-ocr, tabulate, texify, torch, tqdm, transformers Required-by:
Matthijz98 commented 1 week ago

You can look at https://github.com/VikParuchuri/marker/blob/master/marker/settings.py for what the default settings are. Then u can overwrite one by setting a env (google that for your platform) The text in the README.md could make that a bit more clear and support for passing all options as arguments would be nice

smortezah commented 5 days ago

It would be nice to have a TOML config file, e.g. config.toml, instead of changing the settings.py file.