Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,13 +46,13 @@ def search_jobs_tool(
|
|
| 46 |
job_type (str): Job Type (e.g., "Remote Full Time Jobs").
|
| 47 |
industry (str): Company Industry (e.g., "Technology").
|
| 48 |
country (str): Country or region (e.g., "canada", "uk", or "Anywhere").
|
| 49 |
-
limit (int): Maximum number of job results to return (1–
|
| 50 |
|
| 51 |
Returns:
|
| 52 |
dict: A dictionary containing a list of jobs under the "jobs" key or an error message under "error".
|
| 53 |
"""
|
| 54 |
base_url = "https://jobicy.com/api/v2/remote-jobs"
|
| 55 |
-
params = {"count": max(1, min(limit,
|
| 56 |
|
| 57 |
if category:
|
| 58 |
params["industry"] = category.lower().replace(" & ", "-").replace(" ", "-")
|
|
@@ -121,7 +121,7 @@ app = gr.Interface(
|
|
| 121 |
gr.Dropdown(label="Job Type (optional)", choices=JOB_TYPES, value=""),
|
| 122 |
gr.Dropdown(label="Company Industry (optional)", choices=COMPANY_INDUSTRIES, value=""),
|
| 123 |
gr.Dropdown(label="Country / Region (optional)", choices=COUNTRY_CHOICES, value="Anywhere"),
|
| 124 |
-
gr.Slider(minimum=1, maximum=
|
| 125 |
],
|
| 126 |
outputs=gr.Markdown(),
|
| 127 |
title="Jobicy Remote Job Search",
|
|
|
|
| 46 |
job_type (str): Job Type (e.g., "Remote Full Time Jobs").
|
| 47 |
industry (str): Company Industry (e.g., "Technology").
|
| 48 |
country (str): Country or region (e.g., "canada", "uk", or "Anywhere").
|
| 49 |
+
limit (int): Maximum number of job results to return (1–200).
|
| 50 |
|
| 51 |
Returns:
|
| 52 |
dict: A dictionary containing a list of jobs under the "jobs" key or an error message under "error".
|
| 53 |
"""
|
| 54 |
base_url = "https://jobicy.com/api/v2/remote-jobs"
|
| 55 |
+
params = {"count": max(1, min(limit, 200))}
|
| 56 |
|
| 57 |
if category:
|
| 58 |
params["industry"] = category.lower().replace(" & ", "-").replace(" ", "-")
|
|
|
|
| 121 |
gr.Dropdown(label="Job Type (optional)", choices=JOB_TYPES, value=""),
|
| 122 |
gr.Dropdown(label="Company Industry (optional)", choices=COMPANY_INDUSTRIES, value=""),
|
| 123 |
gr.Dropdown(label="Country / Region (optional)", choices=COUNTRY_CHOICES, value="Anywhere"),
|
| 124 |
+
gr.Slider(minimum=1, maximum=200, value=20, step=1, label="Number of Results"),
|
| 125 |
],
|
| 126 |
outputs=gr.Markdown(),
|
| 127 |
title="Jobicy Remote Job Search",
|