Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,21 +11,18 @@ from Gradio_UI import GradioUI
|
|
11 |
|
12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
13 |
@tool
|
14 |
-
def my_custom_tool()-> str: #it's import to specify the return type
|
15 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
16 |
-
"""
|
17 |
-
|
|
|
|
|
18 |
|
19 |
"""
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
jokes = []
|
25 |
-
with path.open(encoding="utf-8") as f:
|
26 |
-
jokes = [line.rstrip("\n") for line in f if line.strip()]
|
27 |
-
|
28 |
-
return jokes[np.random.randint(len(jokes))]
|
29 |
|
30 |
@tool
|
31 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
11 |
|
12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
13 |
@tool
|
14 |
+
def my_custom_tool(location: str)-> str: #it's import to specify the return type
|
15 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
16 |
+
"""This is a tool that returns the most likely websites to hold jobs for a new grad Computer Science major in the given location.
|
17 |
+
Args:
|
18 |
+
location: str = A string representing the location the user wants to search for jobs in
|
19 |
+
e.g. "NYC" -> this tool will return s websites looking for jobs in nyc
|
20 |
|
21 |
"""
|
22 |
+
search = DuckDuckGoSearchTool(max_results=5)
|
23 |
+
hits = search(f"SWE engineering new grad roles in {location}")
|
24 |
+
return hits
|
25 |
+
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
@tool
|
28 |
def get_current_time_in_timezone(timezone: str) -> str:
|