Spaces:
Sleeping
Sleeping
Download math_server.py from myUniverse01/deploy1: direct link, hf CLI and curl.
- Browser
- Download file 635 Bytes
-
https://huggingface.co/spaces/myUniverse01/deploy1/resolve/main/math_server.py
- Command line
-
hf download hf://spaces/myUniverse01/deploy1/math_server.py
-
curl -L -o math_server.py https://huggingface.co/spaces/myUniverse01/deploy1/resolve/main/math_server.py
635 Bytes
| from fastmcp import FastMCP | |
| mcp = FastMCP(name='MathServer', stateless_http=True) | |
| def add_two(a: int, b: int) -> int: | |
| return a + b | |
| def subtract_two(a: int, b: int) -> int: | |
| return a - b | |
| def multiply(a: int, b: int) -> int: | |
| return a * b | |
| def divide(a: float, b: float) -> float: | |
| if b == 0: | |
| raise ValueError('Division by zero is not allowed') | |
| return a / b | |