Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from Gradio_UI import GradioUI
|
|
| 10 |
duckduckgosearch = DuckDuckGoSearchTool()
|
| 11 |
|
| 12 |
@tool
|
| 13 |
-
def get_penguin_facts(facts_num: int = 1)->
|
| 14 |
"""A tool that gives some facts about penguins
|
| 15 |
Args:
|
| 16 |
facts_num: how many facts to fetch. Defaults to 1, max 4
|
|
@@ -22,7 +22,7 @@ def get_penguin_facts(facts_num: int = 1)-> str: #it's import to specify the ret
|
|
| 22 |
"there are lots of penguins in the north",
|
| 23 |
"penguins like to eat fish"
|
| 24 |
]
|
| 25 |
-
return
|
| 26 |
|
| 27 |
@tool
|
| 28 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 10 |
duckduckgosearch = DuckDuckGoSearchTool()
|
| 11 |
|
| 12 |
@tool
|
| 13 |
+
def get_penguin_facts(facts_num: int = 1)-> list: #it's import to specify the return type
|
| 14 |
"""A tool that gives some facts about penguins
|
| 15 |
Args:
|
| 16 |
facts_num: how many facts to fetch. Defaults to 1, max 4
|
|
|
|
| 22 |
"there are lots of penguins in the north",
|
| 23 |
"penguins like to eat fish"
|
| 24 |
]
|
| 25 |
+
return facts[:facts_num]
|
| 26 |
|
| 27 |
@tool
|
| 28 |
def get_current_time_in_timezone(timezone: str) -> str:
|