Spaces:
Runtime error
Runtime error
fix: add missing imports
Browse files
main.py
CHANGED
|
@@ -27,6 +27,13 @@ def index() -> FileResponse:
|
|
| 27 |
|
| 28 |
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
# Doc classifier model
|
| 32 |
classifier_doctype_processor = DonutProcessor.from_pretrained("calumpianojericho/donutclassifier_acctdocs_by_doctype")
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
+
import re
|
| 31 |
+
import torch
|
| 32 |
+
from transformers import DonutProcessor, VisionEncoderDecoderModel
|
| 33 |
+
from datasets import load_dataset
|
| 34 |
+
import os
|
| 35 |
+
from PIL import Image
|
| 36 |
+
|
| 37 |
|
| 38 |
# Doc classifier model
|
| 39 |
classifier_doctype_processor = DonutProcessor.from_pretrained("calumpianojericho/donutclassifier_acctdocs_by_doctype")
|