Spaces:
Sleeping
Sleeping
Daniel Ecer commited on
Commit ·
29658fc
1
Parent(s): c002637
Renamed numbersapi tools for consistency
Browse files
fngradio_various_api_mcp/apis/numbersapi.py
CHANGED
|
@@ -10,7 +10,7 @@ app = FnGradioApp()
|
|
| 10 |
|
| 11 |
|
| 12 |
@app.interface()
|
| 13 |
-
def
|
| 14 |
fact_type: Literal['trivia', 'math', 'date', 'year'] = 'trivia'
|
| 15 |
) -> str:
|
| 16 |
"""
|
|
@@ -22,7 +22,7 @@ def numbersapi_random(
|
|
| 22 |
|
| 23 |
|
| 24 |
@app.interface()
|
| 25 |
-
def
|
| 26 |
number: int,
|
| 27 |
fact_type: Literal['trivia', 'math', 'year'] = 'trivia'
|
| 28 |
) -> str:
|
|
@@ -35,7 +35,7 @@ def numbersapi_number(
|
|
| 35 |
|
| 36 |
|
| 37 |
@app.interface()
|
| 38 |
-
def
|
| 39 |
month: Annotated[int, Field(ge=1, le=12)],
|
| 40 |
day: Annotated[int, Field(ge=1, le=31)]
|
| 41 |
) -> str:
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
@app.interface()
|
| 13 |
+
def get_random_numbers_fact(
|
| 14 |
fact_type: Literal['trivia', 'math', 'date', 'year'] = 'trivia'
|
| 15 |
) -> str:
|
| 16 |
"""
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
@app.interface()
|
| 25 |
+
def get_numbers_fact(
|
| 26 |
number: int,
|
| 27 |
fact_type: Literal['trivia', 'math', 'year'] = 'trivia'
|
| 28 |
) -> str:
|
|
|
|
| 35 |
|
| 36 |
|
| 37 |
@app.interface()
|
| 38 |
+
def get_day_of_year_fact(
|
| 39 |
month: Annotated[int, Field(ge=1, le=12)],
|
| 40 |
day: Annotated[int, Field(ge=1, le=31)]
|
| 41 |
) -> str:
|