Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,21 +9,22 @@ from Gradio_UI import GradioUI
|
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
-
def
|
13 |
-
"""
|
14 |
Args:
|
15 |
-
|
16 |
-
|
17 |
"""
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
27 |
|
28 |
@tool
|
29 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
+
def random_polyphonic_chars(_: str, __: str) -> str:
|
13 |
+
"""Generates 10 random Chinese polyphonic characters (多音字).
|
14 |
Args:
|
15 |
+
_: Unused argument.
|
16 |
+
__: Unused argument.
|
17 |
"""
|
18 |
+
import random
|
19 |
+
polyphonic_chars = [
|
20 |
+
"行", "重", "长", "乐", "和",
|
21 |
+
"难", "好", "觉", "着", "藏",
|
22 |
+
"种", "兴", "发", "都", "还",
|
23 |
+
"干", "差", "空", "折", "弹"
|
24 |
+
]
|
25 |
+
|
26 |
+
selected = random.sample(polyphonic_chars, 10)
|
27 |
+
return "随机选出的10个多音字是:" + "、".join(selected)
|
28 |
|
29 |
@tool
|
30 |
def get_current_time_in_timezone(timezone: str) -> str:
|