Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
torrmal authored Oct 4, 2024
1 parent c0a16b0 commit 3592504
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ brew install poppler


```python
from aipdf.ocr import ocr
from aipdf import ocr

# Your OpenAI API key
api_key = 'your_openai_api_key'
Expand All @@ -35,7 +35,7 @@ markdown_pages = ocr(file, api_key, prompt="extract markdown, extract tables and
You can use with any ollama multi-modal models

```python
ocr(pdf_file, api_key='ollama', model="llama3.2", base_url= 'http://localhost:11434/v1', prompt=DEFAULT_PROMPT)
ocr(pdf_file, api_key='ollama', model="llama3.2", base_url= 'http://localhost:11434/v1', prompt=...)
```
## Any file system

Expand All @@ -46,7 +46,7 @@ We chose that you pass a file object, because that way it is flexible for you to

pdf_file = io.BytesIO(requests.get('https://arxiv.org/pdf/2410.02467').content)

# extract markdown
# extract
pages = ocr(pdf_file, api_key, prompt="extract tables and turn charts into tables, return each table in json")

```
Expand All @@ -61,7 +61,7 @@ s3 = boto3.client('s3', config=Config(signature_version='s3v4'),


pdf_file = io.BytesIO(s3.get_object(Bucket=bucket_name, Key=object_key)['Body'].read())
# extract markdown
# extract
pages = ocr(pdf_file, api_key, prompt="extract tables and turn charts into tables, return each table in json")
```

Expand Down

0 comments on commit 3592504

Please sign in to comment.