Spaces:
Sleeping
Sleeping
fix arg
Browse files
app.py
CHANGED
|
@@ -10,7 +10,11 @@ from Gradio_UI import GradioUI
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 13 |
-
"""Возвращает случайную шутку.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
response = requests.get("https://official-joke-api.appspot.com/random_joke")
|
| 15 |
data = response.json()
|
| 16 |
return f"{data['setup']} — {data['punchline']}"
|
|
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 13 |
+
"""Возвращает случайную шутку.
|
| 14 |
+
Args:
|
| 15 |
+
arg1: the first argument
|
| 16 |
+
arg2: the second argument
|
| 17 |
+
"""
|
| 18 |
response = requests.get("https://official-joke-api.appspot.com/random_joke")
|
| 19 |
data = response.json()
|
| 20 |
return f"{data['setup']} — {data['punchline']}"
|