vechism commited on
Commit
2ce4add
·
verified ·
1 Parent(s): 9b6c6d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -14
app.py CHANGED
@@ -43,20 +43,15 @@ def mutante_unicorn(animal_name:str) -> str: #it's import to specify the return
43
  except Exception as e:
44
  return f"Error creating a mutant unicorn for '{animal_name}': {str(e)}"
45
 
46
- @tool
47
- def describe_animal(animal_name:str) -> str:
48
- """Look up for the name of the animal inwikipedia using websearch tool, and then provide a 300 characters description about that animal
49
- Args:
50
- animal_name: The name of the animal to look up for in wikipedia
51
- """
52
- #search_tool = DuckDuckGoSearchTool()
53
- # Use DuckDuckGoSearchTool to search for the wikipedia url of the person and then visit the url
54
- query = f"{animal_name} wikipedia"
55
- #wikipedia_url = search_tool(query)
56
- # Use the wikipedia url to get the person's description, location, and interesting facts
57
- wikipedia_results = DuckDuckGoSearchTool(query)
58
- #return f"Detailes description: {wikipedia_results['description']}, Location: {wikipedia_results['location']}, Interesting facts: {wikipedia_results['interesting facts']}"
59
- return wikipedia_results
60
 
61
 
62
  #image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
43
  except Exception as e:
44
  return f"Error creating a mutant unicorn for '{animal_name}': {str(e)}"
45
 
46
+ #@tool
47
+ #def describe_animal(animal_name:str) -> str:
48
+ # """Look up for the name of the animal inwikipedia using websearch tool, and then provide a 300 characters description about that animal
49
+ # Args:
50
+ # animal_name: The name of the animal to look up for in wikipedia
51
+ # """
52
+ # query = f"{animal_name} wikipedia"
53
+ # wikipedia_results = DuckDuckGoSearchTool(query)
54
+ # return wikipedia_results
 
 
 
 
 
55
 
56
 
57
  #image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)