Skip to content

Commit

Permalink
Update gradio/components/image.py
Browse files Browse the repository at this point in the history
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
  • Loading branch information
freddyaboulton and abidlabs committed Oct 24, 2023
1 parent 7d18dcf commit 6f1b5ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gradio/components/image.py
Expand Up @@ -249,7 +249,7 @@ def postprocess(
elif isinstance(y, _Image.Image):
path = processing_utils.save_pil_to_cache(y, cache_dir=self.GRADIO_CACHE)
elif isinstance(y, (str, Path)):
path = y if isinstance(y, str) else str(y)
path = str(y)
else:
raise ValueError("Cannot process this value as an Image")
return FileData(name=path, data=None, is_file=True)
Expand Down

0 comments on commit 6f1b5ad

Please sign in to comment.