Spaces:
Running
Running
Download tools/get_system_hardware_specs.py from maubilli/BestLocalModelAgent: direct link, hf CLI and curl.
- Browser
- Download file 680 Bytes
-
https://huggingface.co/spaces/maubilli/BestLocalModelAgent/resolve/main/tools/get_system_hardware_specs.py
- Command line
-
hf download hf://spaces/maubilli/BestLocalModelAgent/tools/get_system_hardware_specs.py
-
curl -L -o get_system_hardware_specs.py https://huggingface.co/spaces/maubilli/BestLocalModelAgent/resolve/main/tools/get_system_hardware_specs.py
680 Bytes
| from smolagents import Tool | |
| from typing import Any, Optional | |
| class SimpleTool(Tool): | |
| name = "get_system_hardware_specs" | |
| description = "Detects and returns the host machine's hardware profile and memory budgets in JSON." | |
| inputs = {} | |
| output_type = "string" | |
| def forward(self) -> 'str': | |
| """Detects and returns the host machine's hardware profile and memory budgets in JSON. | |
| Returns: | |
| A JSON string containing OS, CPU, RAM, GPU, VRAM, and local server status. | |
| """ | |
| import json | |
| from agents.bestLocalModel import detect_system_specs | |
| specs = detect_system_specs() | |
| return json.dumps(specs, indent=2) |