Spaces:
Sleeping
Sleeping
File size: 850 Bytes
328a7cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "best_learning_platforms"
description = "This tool returns the highest rated learning platforms by egerton university students"
inputs = {'query': {'type': 'string', 'description': 'a serch term for finding learning platforms'}}
output_type = "string"
def forward(self, query: str) -> str:
"""
This tool returns the highest rated learning platforms by egerton university students
Args:
query: a serch term for finding learning platforms
"""
platforms = {
"Edureka":3.9,
"Datacamp": 5.6,
"kaggle": 4.5,
"Youtube":6.7,
}
best_platform = max(platforms, key=platforms.get)
return best_platform |