From 30ab78fe9efe4dd59e5499aae34b0c07cd6d1478 Mon Sep 17 00:00:00 2001 From: Sandeep Pawar <62612119+pawarbi@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:15:10 -0600 Subject: [PATCH] Update README.md I have updated the readme with three changes: - Created sections for Installation and Usage to help users - Added installation instruction - Added additional example of using LLM. This will be the primary use case and will help users. --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 5034d03d..7958b0d8 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,14 @@ It presently supports: - HTML (special handling of Wikipedia, etc.) - Various other text-based formats (csv, json, xml, etc.) +# Installation + +You can install `markitdown` using pip: + +```python +pip install markitdown +``` +# Usage The API is simple: ```python @@ -23,6 +31,18 @@ result = markitdown.convert("test.xlsx") print(result.text_content) ``` +You can also configure markitdown to use Large Language Models to describe images. To do so you must provide mlm_client and mlm_model parameters to MarkItDown object, according to your specific client. + +```python +from markitdown import MarkItDown +from openai import OpenAI + +client = OpenAI() +md = MarkItDown(mlm_client=client, mlm_model="gpt-4o") +result = md.convert("example.jpg") +print(result.text_content) +``` + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a