From dc939119ce82c784e711ce8d9c1c95a465fbdc5b Mon Sep 17 00:00:00 2001 From: Yifeng Lu Date: Tue, 12 Mar 2024 10:20:26 -0700 Subject: [PATCH] Internal changes PiperOrigin-RevId: 615088561 --- langfun/core/modalities/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langfun/core/modalities/image.py b/langfun/core/modalities/image.py index 6583633..083f602 100644 --- a/langfun/core/modalities/image.py +++ b/langfun/core/modalities/image.py @@ -34,7 +34,7 @@ def mime_type(self) -> str: return f'image/{self.image_format}' def _repr_html_(self) -> str: - if self.uri: + if self.uri and self.uri.lower().startswith(('http:', 'https:', 'ftp:')): return f'' image_raw = base64.b64encode(self.to_bytes()).decode() return f''