slight if-else tidy
This commit is contained in:
parent
e270e63bbc
commit
3ebe8dfacb
1 changed files with 5 additions and 5 deletions
|
|
@ -88,11 +88,11 @@ def main(args=None):
|
||||||
)
|
)
|
||||||
elif args.filename is None:
|
elif args.filename is None:
|
||||||
raise ValueError("Filename is required when using Document Intelligence.")
|
raise ValueError("Filename is required when using Document Intelligence.")
|
||||||
markitdown = MarkItDown(
|
|
||||||
enable_plugins=args.use_plugins, docintel_endpoint=args.endpoint
|
markitdown = MarkItDown(
|
||||||
)
|
enable_plugins=args.use_plugins,
|
||||||
else:
|
docintel_endpoint=args.endpoint if args.use_docintel else None,
|
||||||
markitdown = MarkItDown(enable_plugins=args.use_plugins)
|
)
|
||||||
|
|
||||||
if args.filename:
|
if args.filename:
|
||||||
result = markitdown.convert(args.filename)
|
result = markitdown.convert(args.filename)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue