Spaces:
Running
Running
Update predict_cheque_parser.py
Browse files- predict_cheque_parser.py +2 -2
predict_cheque_parser.py
CHANGED
@@ -13,8 +13,8 @@ TASK_PROMPT = "<s_cord-v2>"
|
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
|
15 |
def load_donut_model_and_processor():
|
16 |
-
donut_processor = DonutProcessor.from_pretrained(CHEQUE_PARSER_MODEL)
|
17 |
-
model = VisionEncoderDecoderModel.from_pretrained(CHEQUE_PARSER_MODEL)
|
18 |
model.to(device)
|
19 |
return donut_processor, model
|
20 |
|
|
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
|
15 |
def load_donut_model_and_processor():
|
16 |
+
donut_processor = DonutProcessor.from_pretrained(CHEQUE_PARSER_MODEL,use_auth_token='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')
|
17 |
+
model = VisionEncoderDecoderModel.from_pretrained(CHEQUE_PARSER_MODEL,use_auth_token='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')
|
18 |
model.to(device)
|
19 |
return donut_processor, model
|
20 |
|