eocone commited on
Commit
cfa3bdd
·
verified ·
1 Parent(s): 161f95c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,8 +34,8 @@ def dog_average_longevity(breed: str) -> str:
34
  def extract_lifespan(text: str) -> Optional[str]:
35
  """
36
  Extracts the first occurrence of a lifespan range or single number in years.
37
-
38
- :param text: The input text from search results.
39
  :return: Extracted lifespan range or single value (e.g., '10-12 years' or '13 years') or None.
40
  """
41
  pattern = r"(\d{1,2}\s?(-|to)\s?\d{1,2}|\d{1,2})\s?(years|yrs)?"
 
34
  def extract_lifespan(text: str) -> Optional[str]:
35
  """
36
  Extracts the first occurrence of a lifespan range or single number in years.
37
+ Args:
38
+ text: The input text from search results.
39
  :return: Extracted lifespan range or single value (e.g., '10-12 years' or '13 years') or None.
40
  """
41
  pattern = r"(\d{1,2}\s?(-|to)\s?\d{1,2}|\d{1,2})\s?(years|yrs)?"