Small arg handling fixes

This commit is contained in:
Ankur Goyal 2022-08-08 22:03:50 -07:00
parent 3f1b351a6e
commit 02daaaf614
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ class DocumentQuestionAnsweringPipeline(Pipeline):
image = None
image_features = {}
if "image" in input:
if input.get("image", None) is not None:
if not VISION_LOADED:
raise ValueError(
"If you provide an image, then the pipeline will run process it with PIL (Pillow), but"