Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,22 +9,25 @@ 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 |
-
"""A tool that
|
| 14 |
Args:
|
| 15 |
-
|
| 16 |
-
|
| 17 |
"""
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
# Example usage
|
| 22 |
if __name__ == "__main__":
|
| 23 |
-
|
| 24 |
-
print(
|
| 25 |
|
| 26 |
-
|
| 27 |
-
print(
|
| 28 |
|
| 29 |
|
| 30 |
@tool
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def poem_tool(word1: str, word2: str) -> str:
|
| 13 |
+
"""A tool that creates a short, simple poem using two input words.
|
| 14 |
Args:
|
| 15 |
+
word1: The first word to include in the poem.
|
| 16 |
+
word2: The second word to include in the poem.
|
| 17 |
"""
|
| 18 |
+
poem = f"The {word1} softly sighs,\n"
|
| 19 |
+
poem += f"Beneath the moonlit skies.\n"
|
| 20 |
+
poem += f"A gentle breeze then flows,\n"
|
| 21 |
+
poem += f"Where the {word2} gently grows."
|
| 22 |
+
return poem
|
| 23 |
|
| 24 |
+
# Example usage:
|
| 25 |
if __name__ == "__main__":
|
| 26 |
+
output_poem = poem_tool(word1="shadow", word2="flower")
|
| 27 |
+
print(output_poem)
|
| 28 |
|
| 29 |
+
output_another_poem = poem_tool(word1="ocean", word2="dream")
|
| 30 |
+
print(output_another_poem)
|
| 31 |
|
| 32 |
|
| 33 |
@tool
|