Skip to content

Commit d11dfba

Browse files
Adapt OCR example
1 parent a5038e5 commit d11dfba

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

examples/ocr_process_from_file.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ def main():
2626
purpose="ocr",
2727
)
2828

29-
signed_url = client.files.get_signed_url(file_id=uploaded_file.id, expiry=1)
30-
3129
pdf_response = client.ocr.process(document={
32-
"document_url": signed_url.url,
33-
"type": "document_url",
34-
"document_name": "mistral-7b-pdf",
30+
"type": "file",
31+
"file_id": uploaded_file.id,
3532
}, model="mistral-ocr-latest", include_image_base64=True)
3633

3734
# Print the parsed PDF

0 commit comments

Comments
 (0)