Spaces:
Runtime error
Runtime error
HarshEra commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,44 +61,45 @@ def finance_management_plan(budget: float, habits: str, goal: str, period: str)
|
|
| 61 |
f"{new_habits_str}\n"
|
| 62 |
f"This will help you stay on track with your financial goals."
|
| 63 |
)
|
| 64 |
-
|
|
|
|
| 65 |
print(finance_management_plan(1000.0, "Monday: $50, Tuesday: $30, Wednesday: $40, Thursday: $20, Friday: $60, Saturday: $80, Sunday: $70", "Save $500 for a vacation", "month"))
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
-
@tool
|
| 70 |
-
def webscraping_jobs(search_term: str, location: str, results_wanted: int = 20, hours_old: int = 72, country_indeed: str = 'USA') -> str:
|
| 71 |
-
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
|
| 95 |
-
|
| 96 |
-
|
| 97 |
|
| 98 |
-
|
| 99 |
-
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
|
| 104 |
@tool
|
|
|
|
| 61 |
f"{new_habits_str}\n"
|
| 62 |
f"This will help you stay on track with your financial goals."
|
| 63 |
)
|
| 64 |
+
|
| 65 |
+
Example usage:
|
| 66 |
print(finance_management_plan(1000.0, "Monday: $50, Tuesday: $30, Wednesday: $40, Thursday: $20, Friday: $60, Saturday: $80, Sunday: $70", "Save $500 for a vacation", "month"))
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
+
# @tool
|
| 71 |
+
# def webscraping_jobs(search_term: str, location: str, results_wanted: int = 20, hours_old: int = 72, country_indeed: str = 'USA') -> str:
|
| 72 |
+
# """
|
| 73 |
+
# A tool that scrapes job listings from multiple websites based on jobspy library.
|
| 74 |
|
| 75 |
+
# Args:
|
| 76 |
+
# search_term (str): The job title or keywords to search for (e.g., 'software engineer').
|
| 77 |
+
# location (str): The location to search for jobs (e.g., 'San Francisco, CA').
|
| 78 |
+
# results_wanted (int, optional): Number of results to retrieve (default is 20).
|
| 79 |
+
# hours_old (int, optional): Maximum age of job postings in hours (default is 72).
|
| 80 |
+
# country_indeed (str, optional): Country filter for Indeed searches (default is 'USA').
|
| 81 |
|
| 82 |
+
# Returns:
|
| 83 |
+
# str: A message with the number of jobs found and saves results to 'jobs.csv'.
|
| 84 |
+
# """
|
| 85 |
|
| 86 |
+
# jobs = scrape_jobs(
|
| 87 |
+
# site_name=["indeed", "LinkedIn", "google", "bayt", "naukri","Tanitjobs"], # other "zip_recruiter", "glassdoor",
|
| 88 |
+
# search_term=search_term,
|
| 89 |
+
# google_search_term=f"{search_term} jobs near {location} since yesterday",
|
| 90 |
+
# location=location,
|
| 91 |
+
# results_wanted=results_wanted,
|
| 92 |
+
# hours_old=hours_old,
|
| 93 |
+
# country_indeed=country_indeed,
|
| 94 |
+
# )
|
| 95 |
|
| 96 |
+
# if jobs.empty:
|
| 97 |
+
# return f"No jobs found for '{search_term}' in '{location}'."
|
| 98 |
|
| 99 |
+
# # Save results to CSV
|
| 100 |
+
# jobs.to_csv("jobs.csv", quoting=csv.QUOTE_NONNUMERIC, escapechar="\\", index=False)
|
| 101 |
|
| 102 |
+
# return f"Found {len(jobs)} jobs for '{search_term}' in '{location}'. Results saved to 'jobs.csv'."
|
| 103 |
|
| 104 |
|
| 105 |
@tool
|