Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
donut_pytorch
Commits
787d918b
"vscode:/vscode.git/clone" did not exist on "9120ae7d66e3f76f375fd7c941c721ca9164f581"
Unverified
Commit
787d918b
authored
Aug 09, 2022
by
Geewook Kim
Committed by
GitHub
Aug 09, 2022
Browse files
fix: typo, related to #15
parent
4cfb6567
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
test.py
test.py
+1
-1
No files found.
test.py
View file @
787d918b
...
...
@@ -43,7 +43,7 @@ def test(args):
if
args
.
task_name
==
"docvqa"
:
output
=
pretrained_model
.
inference
(
image
=
sample
[
"image"
],
prompt
=
f
"<s_
{
args
.
task_name
}
><s_question>
{
ground_truth
[
"
gt_parses
"
][
0
][
'question'
].
lower
()
}
</s_question><s_answer>"
,
prompt
=
f
"<s_
{
args
.
task_name
}
><s_question>
{
ground_truth
[
'
gt_parses
'
][
0
][
'question'
].
lower
()
}
</s_question><s_answer>"
,
)[
"predictions"
][
0
]
else
:
output
=
pretrained_model
.
inference
(
image
=
sample
[
"image"
],
prompt
=
f
"<s_
{
args
.
task_name
}
>"
)[
"predictions"
][
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment