Update donut_inference.py
Browse files- donut_inference.py +1 -1
donut_inference.py
CHANGED
|
@@ -13,7 +13,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 13 |
# device = "cpu"
|
| 14 |
# Load the processor from the local directory
|
| 15 |
processor = DonutProcessor.from_pretrained("Henge-navuuu/donut-base-finetuned-forms-v1")
|
| 16 |
-
processor.to(device)
|
| 17 |
# Load the model from the local directory
|
| 18 |
model = VisionEncoderDecoderModel.from_pretrained("Henge-navuuu/donut-base-finetuned-forms-v1")
|
| 19 |
model.to(device)
|
|
|
|
| 13 |
# device = "cpu"
|
| 14 |
# Load the processor from the local directory
|
| 15 |
processor = DonutProcessor.from_pretrained("Henge-navuuu/donut-base-finetuned-forms-v1")
|
| 16 |
+
# processor.to(device)
|
| 17 |
# Load the model from the local directory
|
| 18 |
model = VisionEncoderDecoderModel.from_pretrained("Henge-navuuu/donut-base-finetuned-forms-v1")
|
| 19 |
model.to(device)
|