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
0e9a705a
Unverified
Commit
0e9a705a
authored
Jul 29, 2022
by
Geewook Kim
Committed by
GitHub
Jul 29, 2022
Browse files
fix typo
parent
0c962553
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
test.py
test.py
+2
-2
No files found.
test.py
View file @
0e9a705a
...
...
@@ -19,7 +19,7 @@ from donut import DonutModel, JSONParseEvaluator, load_json, save_json
def
test
(
args
):
pretrained_model
=
DonutModel
.
from_pretrained
(
args
.
pretrained_path
)
pretrained_model
=
DonutModel
.
from_pretrained
(
args
.
pretrained_
model_name_or_
path
)
if
torch
.
cuda
.
is_available
():
pretrained_model
.
half
()
...
...
@@ -74,7 +74,7 @@ def test(args):
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--pretrained_path"
,
type
=
str
)
parser
.
add_argument
(
"--pretrained_
model_name_or_
path"
,
type
=
str
)
parser
.
add_argument
(
"--dataset_name_or_path"
,
type
=
str
)
parser
.
add_argument
(
"--split"
,
type
=
str
,
default
=
"test"
)
parser
.
add_argument
(
"--task_name"
,
type
=
str
,
default
=
None
)
...
...
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