From 1a968f94c22742b97cf3391b8cb2b15ddd35273e Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Mon, 18 Dec 2023 18:30:43 -0500 Subject: [PATCH] add code --- docs/examples/extracting_tables.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/examples/extracting_tables.md b/docs/examples/extracting_tables.md index cbf3ec1..8fd29a5 100644 --- a/docs/examples/extracting_tables.md +++ b/docs/examples/extracting_tables.md @@ -2,6 +2,8 @@ This post demonstrates how to use Python's type annotations and OpenAI's new vision model to extract tables from images and convert them into markdown format. This method is particularly useful for data analysis and automation tasks. +The full code is available on [GitHub](https://github.com/jxnl/instructor/blob/main/examples/vision/run_table.py) + ## Building the Custom Type for Markdown Tables First, we define a custom type, `MarkdownDataFrame`, to handle pandas DataFrames formatted in markdown. This type uses Python's `Annotated` and `InstanceOf` types, along with decorators `BeforeValidator` and `PlainSerializer`, to process and serialize the data.