Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -483,7 +483,7 @@ def run_crew(api_key: str, job_url: str, company_name: str, resume_pdf_path: str
|
|
483 |
if not api_key:
|
484 |
return "⚠️ Please provide a valid OpenAI API Key."
|
485 |
|
486 |
-
os.environ["
|
487 |
# os.environ["HUGGINGFACEHUB_API_TOKEN"] = userdata.get('HF_TOKEN')
|
488 |
|
489 |
# Load PDF as knowledge source
|
@@ -493,10 +493,9 @@ def run_crew(api_key: str, job_url: str, company_name: str, resume_pdf_path: str
|
|
493 |
# Initialize CrewAI with resume knowledge
|
494 |
print(resume_pdf_path)
|
495 |
# Initialize HuggingFaceHub with API token
|
496 |
-
llm =
|
497 |
-
|
498 |
-
|
499 |
-
huggingfacehub_api_token=api_key,
|
500 |
)
|
501 |
# Create agents with the initialized llm
|
502 |
resume_analyzer.llm = llm
|
|
|
483 |
if not api_key:
|
484 |
return "⚠️ Please provide a valid OpenAI API Key."
|
485 |
|
486 |
+
os.environ["GROQ_API_KEY"] = f"{api_key}" # Set API key securely
|
487 |
# os.environ["HUGGINGFACEHUB_API_TOKEN"] = userdata.get('HF_TOKEN')
|
488 |
|
489 |
# Load PDF as knowledge source
|
|
|
493 |
# Initialize CrewAI with resume knowledge
|
494 |
print(resume_pdf_path)
|
495 |
# Initialize HuggingFaceHub with API token
|
496 |
+
llm = LLM(
|
497 |
+
model="groq/llama-3.2-90b-text-preview",
|
498 |
+
temperature=0.7
|
|
|
499 |
)
|
500 |
# Create agents with the initialized llm
|
501 |
resume_analyzer.llm = llm
|