intern_assignment / deepseek.py
Battlecon's picture
Initial clean deployment commit
05cb41b
Raw
History Blame Contribute Delete
357 Bytes
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"])