mMonika commited on
Commit
a92bcc4
·
verified ·
1 Parent(s): dc61f80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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["HUGGINGFACEHUB_API_TOKEN"] = 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,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 = HuggingFaceHub(
497
- repo_id="mistralai/Mistral-7B-Instruct-v0.2",
498
- task="text-generation",
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