Metadata-Version: 2.4
Name: tinydoc
Version: 0.1.1
Summary: Python SDK for TinyDoc-VLM document understanding — the world's smallest document-specialist VLM
Home-page: https://github.com/eulogik/TinyDoc-VLM
Author: eulogik
Author-email: hello@eulogik.com
Project-URL: HuggingFace Model, https://huggingface.co/eulogik/TinyDoc-VLM-256M
Project-URL: HuggingFace Space, https://huggingface.co/spaces/eulogik/TinyDoc-VLM
Project-URL: Bug Tracker, https://github.com/eulogik/TinyDoc-VLM/issues
Project-URL: Documentation, https://github.com/eulogik/TinyDoc-VLM#readme
Project-URL: Website, https://eulogik.github.io/TinyDoc-VLM/
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Intended Audience :: Developers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.8.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: torch>=2.2.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: transformers>=4.48.0
Requires-Dist: sentencepiece>=0.2.0
Provides-Extra: onnx
Requires-Dist: onnxruntime>=1.19.0; extra == "onnx"
Requires-Dist: optimum>=1.22.0; extra == "onnx"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TinyDoc Python SDK

`pip install tinydoc`

Python SDK for [TinyDoc-VLM](https://github.com/eulogik/TinyDoc-VLM) — the world's smallest document-specialist VLM by [eulogik](https://eulogik.com).

```python
from PIL import Image
from tinydoc import TinyDocExtractor

extractor = TinyDocExtractor()
img = Image.open("invoice.png")

result = extractor.ask(img, "What is the total?")
print(result.answer)

result = extractor.extract(img, output_format="json")
print(result.fields)

result = extractor.extract_table(img)
print(result.markdown)
```

[Documentation](https://github.com/eulogik/TinyDoc-VLM#readme) · [HF Model](https://huggingface.co/eulogik/TinyDoc-VLM-256M) · [HF Space](https://huggingface.co/spaces/eulogik/TinyDoc-VLM) · [Issues](https://github.com/eulogik/TinyDoc-VLM/issues)
