Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,17 +12,11 @@ from Gradio_UI import GradioUI
|
|
| 12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 13 |
@tool
|
| 14 |
def get_wikipedia_news(topic: str, limit: int = 5, delay: float = 0.0) -> list:
|
| 15 |
-
"""A tool that connects to a live Wikipedia edit stream and
|
| 16 |
-
|
| 17 |
-
This function listens for real-time Wikipedia edits. It checks if the
|
| 18 |
-
page title or edit comment contains the given topic. If there is a match,
|
| 19 |
-
it collects details such as the page title, user, comment, and timestamp.
|
| 20 |
-
|
| 21 |
Args:
|
| 22 |
topic (str): The word or phrase to search for in Wikipedia edits.
|
| 23 |
limit (int): The number of edits to collect (default: 5).
|
| 24 |
delay (float): Time in seconds to wait between edits (default: 0.0).
|
| 25 |
-
|
| 26 |
Returns:
|
| 27 |
list: A list of edits, each containing:
|
| 28 |
- title (str): The page that was edited.
|
|
|
|
| 12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 13 |
@tool
|
| 14 |
def get_wikipedia_news(topic: str, limit: int = 5, delay: float = 0.0) -> list:
|
| 15 |
+
"""A tool that fetches connects to a live Wikipedia edit stream and looks for edits where the title or comment contains the given topic. If there is a match, it saves details like the page title, user, comment, and timestamp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
Args:
|
| 17 |
topic (str): The word or phrase to search for in Wikipedia edits.
|
| 18 |
limit (int): The number of edits to collect (default: 5).
|
| 19 |
delay (float): Time in seconds to wait between edits (default: 0.0).
|
|
|
|
| 20 |
Returns:
|
| 21 |
list: A list of edits, each containing:
|
| 22 |
- title (str): The page that was edited.
|