VikParuchuri / marker

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

How to change settings when installed via pip? #162

Open EliasPereirah opened 5 months ago

EliasPereirah commented 5 months 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 5 months ago

I am also puzzled by this..

gmotta commented 5 months 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 4 months 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 4 months ago

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