Upload tool
Browse filesFiles changed (3)
- app.pyAdded+6
- requirements.txtAdded+1
- tool.pyAdded+15
123456from smolagents import launch_gradio_demofrom tool import SimpleTool
tool = SimpleTool()
launch_gradio_demo(tool)1smolagents123456789101112131415from smolagents import Toolfrom typing import Any, Optional
class SimpleTool(Tool): name = "valid_tool_function" description = "A valid tool function." inputs = {"input":{"type":"string","description":"Input string."}} output_type = "string"
def forward(self, input: str) -> str: """A valid tool function. Args: input (str): Input string. """ return input.upper()app.pyAdded+6
requirements.txtAdded+1
tool.pyAdded+15