From b0044720da74bee9a3f1fa253fc77574aa0cee4e Mon Sep 17 00:00:00 2001 From: Kenny Zhang Date: Thu, 20 Feb 2025 16:56:47 -0500 Subject: [PATCH] updated docs --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 8ac2fe3..7e6f72b 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,18 @@ result = md.convert("test.pdf") print(result.text_content) ``` +MarkItDown also supports converting file objects directly: + +```python +from markitdown import MarkItDown + +md = MarkItDown() +path = "test.docx" +with open(path, 'rb') as file: + result = md.convert(file, file_extension=".docx") + print(result.text_content) +``` + To use Large Language Models for image descriptions, provide `llm_client` and `llm_model`: ```python