import ollama with open("handwriting.png", "rb") as f: image_data = f.read() response = ollama.chat( model="deepseek-ocr", messages=[ { "role": "user", "content": "Extract all text from this medical prescription image.", "images": [image_data] } ] ) print(response["message"]["content"])