Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,12 @@ def count_words(text: str) -> str:
|
|
| 24 |
word_count = len(text.split())
|
| 25 |
return f"The text contains {word_count} words."
|
| 26 |
|
|
|
|
|
|
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
@tool
|
| 29 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 30 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
|
| 24 |
word_count = len(text.split())
|
| 25 |
return f"The text contains {word_count} words."
|
| 26 |
|
| 27 |
+
result = count_words("Hello world! This is an AI agent tool.")
|
| 28 |
+
print(result)
|
| 29 |
|
| 30 |
+
The text contains 7 words.
|
| 31 |
+
|
| 32 |
+
|
| 33 |
@tool
|
| 34 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 35 |
"""A tool that fetches the current local time in a specified timezone.
|