giulia-fontanella commited on
Commit
797ded5
·
verified ·
1 Parent(s): 58c57f1

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +5 -5
tools.py CHANGED
@@ -7,10 +7,10 @@ def extract_text(img_path: str) -> str:
7
  Extract text from an image file using a multimodal model.
8
 
9
  Args:
10
- img_path: A url pointing to an image (e.g., PNG, JPEG).
11
 
12
  Returns:
13
- A single string containing the concatenated text extracted from each image.
14
  """
15
  all_text = ""
16
  try:
@@ -63,11 +63,11 @@ def describe_image(img_path: str, query: str) -> str:
63
  following a specific query.
64
 
65
  Args:
66
- img_path: A url pointing to an image (e.g., PNG, JPEG).
67
- query: Information to extract from the image
68
 
69
  Returns:
70
- A single string containing a detailed, human-readable description of the image.
71
  """
72
  try:
73
  # Read image and encode as base64
 
7
  Extract text from an image file using a multimodal model.
8
 
9
  Args:
10
+ img_path: A string representing the url of an image (e.g., PNG, JPEG).
11
 
12
  Returns:
13
+ A single string containing the concatenated text extracted from the image.
14
  """
15
  all_text = ""
16
  try:
 
63
  following a specific query.
64
 
65
  Args:
66
+ img_path: A string representing the url of an image (e.g., PNG, JPEG).
67
+ query: Information to extract from the image.
68
 
69
  Returns:
70
+ A single string containing a detailed description of the image.
71
  """
72
  try:
73
  # Read image and encode as base64