Spaces:
Sleeping
Sleeping
Update app.py
Browse files14 unmodified lines1516171819202122232414 unmodified linesarg1: The input text to search.arg2: The letter to count (e.g., 'a')."""if len(arg2) != 1 or not arg2.isalpha():return "Error: arg2 must be a single alphabet letter."count = arg1.count(arg2)return f"The letter '{arg2}' appears {count} time(s) in the text."@tooldef get_current_time_in_timezone(timezone: str) -> str:14 unmodified lines1516171819202122232425262714 unmodified linesarg1: The input text to search.arg2: The letter to count (e.g., 'a')."""try:if len(arg2) != 1 or not arg2.isalpha():return "Error: arg2 must be a single alphabet letter."count = arg1.count(arg2)return f"The letter '{arg2}' appears {count} time(s) in the text."except Exception as e:return f"Error: {str(e)}"@tooldef get_current_time_in_timezone(timezone: str) -> str:
app.py+7-4