@@ -128,9 +128,11 @@ Examples:
128
128
``partition_pdf ``
129
129
---------------------
130
130
131
- The ``partition_pdf `` function segments a PDF document by calling the document image analysis API.
132
- The intent of the parameters ``url `` and ``token `` is to allow users to self host an inference API,
133
- if desired.
131
+ The ``partition_pdf `` function segments a PDF document by using a document image analysis model.
132
+ If you set ``url=None ``, the document image analysis model will execute locally. If you set
133
+ the URL, ``partition_pdf `` will make a call to a remote inference server.
134
+ ``partition_pdf `` also includes a ``token `` function that allows you to pass in an authentication
135
+ token for a remote API call.
134
136
135
137
Examples:
136
138
@@ -139,7 +141,25 @@ Examples:
139
141
from unstructured.partition.pdf import partition_pdf
140
142
141
143
# Returns a List[Element] present in the pages of the parsed pdf document
142
- elements = partition_pdf(" example-docs/layout-parser-paper-fast.pdf" )
144
+ elements = partition_pdf(" example-docs/layout-parser-paper-fast.pdf" , url = None )
145
+
146
+
147
+ ``partition_image ``
148
+ ---------------------
149
+
150
+ The ``partition_image `` function has the same API as ``partition_pdf ``, which is document above.
151
+ The only difference is that ``partition_image `` does not need to convert a PDF to an image
152
+ prior to processing. The ``partition_image `` function supports ``.png `` and ``.jpg `` files.
153
+
154
+ Examples:
155
+
156
+ .. code :: python
157
+
158
+ from unstructured.partition.image import partition_image
159
+
160
+ # Returns a List[Element] present in the pages of the parsed image document
161
+ elements = partition_image(" example-docs/layout-parser-paper-fast.jpg" , url = None )
162
+
143
163
144
164
145
165
``partition_email ``
0 commit comments