Askinkaty commited on
Commit
791ae86
·
verified ·
1 Parent(s): dca31c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -49,16 +49,16 @@ def generate_surfer_image(next_tide: str) -> str:
49
  @tool
50
  def display_image_tool(image: Union[Image.Image, str]) -> None:
51
  """
52
- A tool that displays an image correctly in different formats.
53
 
54
  Args:
55
- image (Union[PIL.Image.Image, str]):
56
- - A PIL Image object
57
- - A URL string (starting with "http")
58
- - A Base64-encoded image string (starting with "data:image")
59
-
60
  Returns:
61
- None. Displays the image in the notebook or script.
 
 
 
 
62
  """
63
  if isinstance(image, Image.Image):
64
  # If it's a PIL Image, display it directly
 
49
  @tool
50
  def display_image_tool(image: Union[Image.Image, str]) -> None:
51
  """
52
+ Display an image in different formats.
53
 
54
  Args:
55
+ image: The image to display. It can be a PIL Image object; a URL string (starting with "http"), a Base64-encoded image string (starting with "data:image").
 
 
 
 
56
  Returns:
57
+ None: The function does not return anything. It displays the image in the notebook or script.
58
+
59
+ Raises:
60
+ ValueError: If the string format is not a valid image URL or Base64 string.
61
+ TypeError: If the input is not a PIL Image or a string.
62
  """
63
  if isinstance(image, Image.Image):
64
  # If it's a PIL Image, display it directly