Skip to content

Commit

Permalink
Add updated instructions for table/chart OCR extract (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
drobison00 authored Nov 7, 2024
1 parent ba8c6d5 commit cefb7ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ from nv_ingest_client.primitives import JobSpec
from nv_ingest_client.primitives.tasks import ExtractTask
from nv_ingest_client.primitives.tasks import SplitTask
from nv_ingest_client.util.file_processing.extract import extract_file_content
from nv_ingest_client.primitives.tasks.table_extraction import TableExtractionTask
from nv_ingest_client.primitives.tasks.chart_extraction import ChartExtractionTask

logger = logging.getLogger("nv_ingest_client")

Expand Down Expand Up @@ -243,7 +245,12 @@ extract_task = ExtractTask(
extract_tables=True
)

table_data_extract = TableExtractionTask()
chart_data_extract = ChartExtractionTask()

job_spec.add_task(extract_task)
job_spec.add_task(table_data_extract)
job_spec.add_task(chart_data_extract)

# Create the client and inform it about the JobSpec we want to process.
client = NvIngestClient(
Expand Down

0 comments on commit cefb7ef

Please sign in to comment.