eocone commited on
Commit
4f24e26
·
verified ·
1 Parent(s): cb3155b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -11,9 +11,14 @@ from Gradio_UI import GradioUI
11
 
12
  @tool
13
  def dog_average_longevity(breed: str) -> str:
14
- """A tool that uses DuckDuckGo to search the web and returns the average lifespan for a breed of dogs.
15
- Args:
16
- breed(str): A string representing the breed of the dog (e.g., "Labrador").
 
 
 
 
 
17
  """
18
  query = f"average lifespan for {breed} dog in years"
19
 
@@ -28,6 +33,7 @@ def dog_average_longevity(breed: str) -> str:
28
 
29
  return "No reliable lifespan information found. Please check with a veterinarian."
30
 
 
31
  def extract_lifespan(text: str) -> Optional[str]:
32
  """
33
  Extracts the first occurrence of a lifespan range or single number in years.
 
11
 
12
  @tool
13
  def dog_average_longevity(breed: str) -> str:
14
+ """
15
+ A tool that uses DuckDuckGo to search the web and returns the average lifespan for a given dog breed.
16
+
17
+ Parameters:
18
+ breed (str): The breed of the dog (e.g., "Labrador").
19
+
20
+ Returns:
21
+ str: The average lifespan of the specified dog breed in years.
22
  """
23
  query = f"average lifespan for {breed} dog in years"
24
 
 
33
 
34
  return "No reliable lifespan information found. Please check with a veterinarian."
35
 
36
+
37
  def extract_lifespan(text: str) -> Optional[str]:
38
  """
39
  Extracts the first occurrence of a lifespan range or single number in years.