Update donut_inference.py
Browse files- donut_inference.py +2 -2
donut_inference.py
CHANGED
|
@@ -11,10 +11,10 @@ load_dotenv()
|
|
| 11 |
|
| 12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 13 |
# Load the processor from the local directory
|
| 14 |
-
processor = DonutProcessor.from_pretrained("
|
| 15 |
|
| 16 |
# Load the model from the local directory
|
| 17 |
-
model = VisionEncoderDecoderModel.from_pretrained("
|
| 18 |
model.to(device)
|
| 19 |
|
| 20 |
@st.cache_resource
|
|
|
|
| 11 |
|
| 12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 13 |
# Load the processor from the local directory
|
| 14 |
+
processor = DonutProcessor.from_pretrained("/DocQA/Model")
|
| 15 |
|
| 16 |
# Load the model from the local directory
|
| 17 |
+
model = VisionEncoderDecoderModel.from_pretrained("/DocQA/Model")
|
| 18 |
model.to(device)
|
| 19 |
|
| 20 |
@st.cache_resource
|