Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def process_uploaded_file(file):
|
|
| 30 |
|
| 31 |
# Function to call Together API for Mistral inference
|
| 32 |
def analyze_with_mistral(resume_text, job_description):
|
| 33 |
-
TOGETHER_API_KEY = os.getenv("HUGGINGFACE_API_KEY")
|
| 34 |
url = "https://api.together.xyz/v1/chat/completions"
|
| 35 |
|
| 36 |
# Constructing the message format
|
|
@@ -41,10 +41,8 @@ def analyze_with_mistral(resume_text, job_description):
|
|
| 41 |
Provide a detailed breakdown of ATS parameters (keywords, formatting, skills match,
|
| 42 |
experience relevance, education) and assign a score out of 100 for each, along with an overall score.
|
| 43 |
Return the result in JSON format.
|
| 44 |
-
|
| 45 |
Resume:
|
| 46 |
{resume_text}
|
| 47 |
-
|
| 48 |
Job Description:
|
| 49 |
{job_description}
|
| 50 |
"""}
|
|
@@ -85,7 +83,6 @@ with gr.Blocks(fill_height=True, title="Smart ATS Resume Analyzer") as demo:
|
|
| 85 |
with gr.Sidebar():
|
| 86 |
gr.Markdown("# Smart ATS Resume Analyzer")
|
| 87 |
gr.Markdown("Upload your resume (PDF/Word) and enter a job description to get an ATS compatibility score.")
|
| 88 |
-
button = gr.LoginButton("Sign in with Hugging Face")
|
| 89 |
|
| 90 |
with gr.Row():
|
| 91 |
with gr.Column(scale=1):
|
|
|
|
| 30 |
|
| 31 |
# Function to call Together API for Mistral inference
|
| 32 |
def analyze_with_mistral(resume_text, job_description):
|
| 33 |
+
TOGETHER_API_KEY = os.getenv("HUGGINGFACE_API_KEY") # Ensure your API key is set in environment variables
|
| 34 |
url = "https://api.together.xyz/v1/chat/completions"
|
| 35 |
|
| 36 |
# Constructing the message format
|
|
|
|
| 41 |
Provide a detailed breakdown of ATS parameters (keywords, formatting, skills match,
|
| 42 |
experience relevance, education) and assign a score out of 100 for each, along with an overall score.
|
| 43 |
Return the result in JSON format.
|
|
|
|
| 44 |
Resume:
|
| 45 |
{resume_text}
|
|
|
|
| 46 |
Job Description:
|
| 47 |
{job_description}
|
| 48 |
"""}
|
|
|
|
| 83 |
with gr.Sidebar():
|
| 84 |
gr.Markdown("# Smart ATS Resume Analyzer")
|
| 85 |
gr.Markdown("Upload your resume (PDF/Word) and enter a job description to get an ATS compatibility score.")
|
|
|
|
| 86 |
|
| 87 |
with gr.Row():
|
| 88 |
with gr.Column(scale=1):
|