Spaces:
Sleeping
Sleeping
back to open ai
Browse files
app.py
CHANGED
@@ -17,12 +17,12 @@ from typing import List, Dict, Optional
|
|
17 |
from pydantic import BaseModel, Field, confloat
|
18 |
|
19 |
# llm = LLM(model="deepseek/deepseek-r1-distill-qwen-32b")
|
20 |
-
from crewai.llms import LiteLLM
|
21 |
|
22 |
-
llm = LiteLLM(
|
23 |
-
|
24 |
-
|
25 |
-
)
|
26 |
class SkillScore(BaseModel):
|
27 |
skill_name: str = Field(description="Name of the skill being scored")
|
28 |
required: bool = Field(description="Whether this skill is required or nice-to-have")
|
@@ -248,7 +248,7 @@ resume_analyzer = Agent(
|
|
248 |
providing actionable suggestions for improvement. Your recommendations always
|
249 |
focus on both human readability and ATS compatibility.""",
|
250 |
verbose=True,
|
251 |
-
llm = llm,
|
252 |
# knowledge_sources=[pdf_source],
|
253 |
)
|
254 |
job_analyzer = Agent(
|
@@ -261,7 +261,7 @@ job_analyzer = Agent(
|
|
261 |
and soft skills requirements, and can evaluate experience levels accurately.""",
|
262 |
verbose=True,
|
263 |
tools=[ScrapeWebsiteTool()],
|
264 |
-
llm = llm,
|
265 |
|
266 |
# knowledge_sources=[pdf_source],
|
267 |
)
|
@@ -275,7 +275,7 @@ company_researcher = Agent(
|
|
275 |
candidates for interviews. """,
|
276 |
tools=[SerperDevTool()],
|
277 |
verbose=True,
|
278 |
-
llm = llm,
|
279 |
|
280 |
# knowledge_sources=[pdf_source],
|
281 |
|
@@ -289,7 +289,7 @@ resume_writer = Agent (
|
|
289 |
beautifully formatted, ATS-friendly documents that maintain professionalism
|
290 |
while showcasing candidate strengths effectively.""",
|
291 |
verbose=True,
|
292 |
-
llm = llm,
|
293 |
|
294 |
)
|
295 |
report_generator = Agent(
|
@@ -302,7 +302,7 @@ report_generator = Agent(
|
|
302 |
into clear, actionable insights with proper markdown formatting, emojis, and
|
303 |
visual elements that make information both appealing and easily digestible.""",
|
304 |
verbose=True,
|
305 |
-
llm = llm,
|
306 |
|
307 |
)
|
308 |
|
@@ -499,7 +499,7 @@ def run_crew(api_key: str, job_url: str, company_name: str, resume_pdf_path: str
|
|
499 |
if not api_key:
|
500 |
return "⚠️ Please provide a valid OpenAI API Key."
|
501 |
|
502 |
-
|
503 |
# Load PDF as knowledge source
|
504 |
# pdf_source = resume_pdf_path
|
505 |
pdf_source = PDFKnowledgeSource(
|
|
|
17 |
from pydantic import BaseModel, Field, confloat
|
18 |
|
19 |
# llm = LLM(model="deepseek/deepseek-r1-distill-qwen-32b")
|
20 |
+
# from crewai.llms import LiteLLM
|
21 |
|
22 |
+
# llm = LiteLLM(
|
23 |
+
# model="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
|
24 |
+
# api_base="http://localhost:8000" # or DeepSeek API
|
25 |
+
# )
|
26 |
class SkillScore(BaseModel):
|
27 |
skill_name: str = Field(description="Name of the skill being scored")
|
28 |
required: bool = Field(description="Whether this skill is required or nice-to-have")
|
|
|
248 |
providing actionable suggestions for improvement. Your recommendations always
|
249 |
focus on both human readability and ATS compatibility.""",
|
250 |
verbose=True,
|
251 |
+
# llm = llm,
|
252 |
# knowledge_sources=[pdf_source],
|
253 |
)
|
254 |
job_analyzer = Agent(
|
|
|
261 |
and soft skills requirements, and can evaluate experience levels accurately.""",
|
262 |
verbose=True,
|
263 |
tools=[ScrapeWebsiteTool()],
|
264 |
+
# llm = llm,
|
265 |
|
266 |
# knowledge_sources=[pdf_source],
|
267 |
)
|
|
|
275 |
candidates for interviews. """,
|
276 |
tools=[SerperDevTool()],
|
277 |
verbose=True,
|
278 |
+
# llm = llm,
|
279 |
|
280 |
# knowledge_sources=[pdf_source],
|
281 |
|
|
|
289 |
beautifully formatted, ATS-friendly documents that maintain professionalism
|
290 |
while showcasing candidate strengths effectively.""",
|
291 |
verbose=True,
|
292 |
+
# llm = llm,
|
293 |
|
294 |
)
|
295 |
report_generator = Agent(
|
|
|
302 |
into clear, actionable insights with proper markdown formatting, emojis, and
|
303 |
visual elements that make information both appealing and easily digestible.""",
|
304 |
verbose=True,
|
305 |
+
# llm = llm,
|
306 |
|
307 |
)
|
308 |
|
|
|
499 |
if not api_key:
|
500 |
return "⚠️ Please provide a valid OpenAI API Key."
|
501 |
|
502 |
+
os.environ["OPENAI_API_KEY"] = f"{api_key}" # Set API key securely
|
503 |
# Load PDF as knowledge source
|
504 |
# pdf_source = resume_pdf_path
|
505 |
pdf_source = PDFKnowledgeSource(
|