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:
|
||||
raise ValueError("Filename is required when using Document Intelligence.")
|
||||
markitdown = MarkItDown(
|
||||
enable_plugins=args.use_plugins, docintel_endpoint=args.endpoint
|
||||
)
|
||||
else:
|
||||
markitdown = MarkItDown(enable_plugins=args.use_plugins)
|
||||
|
||||
markitdown = MarkItDown(
|
||||
enable_plugins=args.use_plugins,
|
||||
docintel_endpoint=args.endpoint if args.use_docintel else None,
|
||||
)
|
||||
|
||||
if args.filename:
|
||||
result = markitdown.convert(args.filename)
|
||||
|
|
|
|||
Loading…
Reference in a new issue