It's not extracting images from a textbook excerpt I uploaded / tried with python SDK #150

Closed
opened 2026-02-16 00:17:00 -05:00 by yindo · 1 comment
Owner

Originally created by @KING-SID on GitHub (Jun 13, 2024).

😭 does extracting images not really work that well?

# Uncomment if you are in a Jupyter Notebook
import nest_asyncio
nest_asyncio.apply()

from llama_parse import LlamaParse  # pip install llama-parse

parser = LlamaParse(
    api_key="blah-blah-blah",  # can also be set in your env as LLAMA_CLOUD_API_KEY
    result_type="markdown",  # "markdown" and "text" are available
    parsing_instruction="This is a text book which has figures, tables, diagrams, and text. Please extract all the images, text and the tables from the document.",
)

# sync
documents = parser.load_data("./ECON_textbook_100_pages.pdf")

# async
# documents = await parser.aload_data("./my_file.pdf")
Originally created by @KING-SID on GitHub (Jun 13, 2024). 😭 does extracting images not really work that well? ``` # Uncomment if you are in a Jupyter Notebook import nest_asyncio nest_asyncio.apply() from llama_parse import LlamaParse # pip install llama-parse parser = LlamaParse( api_key="blah-blah-blah", # can also be set in your env as LLAMA_CLOUD_API_KEY result_type="markdown", # "markdown" and "text" are available parsing_instruction="This is a text book which has figures, tables, diagrams, and text. Please extract all the images, text and the tables from the document.", ) # sync documents = parser.load_data("./ECON_textbook_100_pages.pdf") # async # documents = await parser.aload_data("./my_file.pdf") ```
yindo closed this issue 2026-02-16 00:17:00 -05:00
Author
Owner

@hexapode commented on GitHub (Jun 18, 2024):

Did you try to look at the result_type="json" results? Images should be there

@hexapode commented on GitHub (Jun 18, 2024): Did you try to look at the result_type="json" results? Images should be there
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#150