Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def download_file(url):
|
|
9 |
"""Download a file from a given URL and save it to a temporary location."""
|
10 |
try:
|
11 |
response = requests.get(url)
|
12 |
-
response.raise_for_status()
|
13 |
|
14 |
# Define the path for the temporary file
|
15 |
temp_file_path = os.path.join('/tmp', os.path.basename(url))
|
@@ -55,7 +55,7 @@ def analyze_resume_with_job_description(resume_text, job_description, api_key):
|
|
55 |
|
56 |
def extract_info_from_resumes(resume_paths, job_description):
|
57 |
"""Extract information from multiple resumes and analyze them against the job description."""
|
58 |
-
api_key = "
|
59 |
results = []
|
60 |
|
61 |
for resume_path in resume_paths:
|
@@ -95,8 +95,8 @@ iface = gr.Interface(
|
|
95 |
gr.Textbox(label="Job Description", lines=5, placeholder="Enter the job description here..."),
|
96 |
gr.Textbox(label="File URLs (comma-separated)", lines=2, placeholder="Enter resume file URLs here, separated by commas...")
|
97 |
],
|
98 |
-
outputs="json",
|
99 |
-
title="Resume Analysis Tool v1
|
100 |
description="Upload your resumes via URLs, and analyze them against a job description."
|
101 |
)
|
102 |
|
|
|
9 |
"""Download a file from a given URL and save it to a temporary location."""
|
10 |
try:
|
11 |
response = requests.get(url)
|
12 |
+
response.raise_for_status()
|
13 |
|
14 |
# Define the path for the temporary file
|
15 |
temp_file_path = os.path.join('/tmp', os.path.basename(url))
|
|
|
55 |
|
56 |
def extract_info_from_resumes(resume_paths, job_description):
|
57 |
"""Extract information from multiple resumes and analyze them against the job description."""
|
58 |
+
api_key = os.environ.get("OPENAI_API_KEY") # Securely retrieve your OpenAI API key
|
59 |
results = []
|
60 |
|
61 |
for resume_path in resume_paths:
|
|
|
95 |
gr.Textbox(label="Job Description", lines=5, placeholder="Enter the job description here..."),
|
96 |
gr.Textbox(label="File URLs (comma-separated)", lines=2, placeholder="Enter resume file URLs here, separated by commas...")
|
97 |
],
|
98 |
+
outputs="json",
|
99 |
+
title="Resume Analysis Tool v1 openai",
|
100 |
description="Upload your resumes via URLs, and analyze them against a job description."
|
101 |
)
|
102 |
|