bainskarman commited on
Commit
aef8f8f
·
verified ·
1 Parent(s): 24ab423

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +5 -9
model.py CHANGED
@@ -1,4 +1,4 @@
1
- from transformers import AutoTokenizer, AutoModelForCausalLM
2
  import os
3
  import torch
4
 
@@ -8,15 +8,11 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
8
 
9
  # Load the tokenizer and model once, outside of the function
10
  huggingface_token = os.environ.get("KEY2")
11
- tokenizer = AutoTokenizer.from_pretrained(
12
- "meta-llama/Llama-3.2-1B",
13
- use_auth_token=huggingface_token
14
 
15
- )
16
- model = AutoModelForCausalLM.from_pretrained(
17
- "meta-llama/Llama-3.2-1B",
18
- use_auth_token=huggingface_token
19
- ).to(device)
20
 
21
  def modelFeedback(ats_score, resume_data, job_description):
22
  """
 
1
+ from transformers import AutoTokenizer, AutoModelForCausalLM, AutoModelForCausalLM
2
  import os
3
  import torch
4
 
 
8
 
9
  # Load the tokenizer and model once, outside of the function
10
  huggingface_token = os.environ.get("KEY2")
 
 
 
11
 
12
+
13
+ # Load the tokenizer and model directly
14
+ tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1", trust_remote_code=True)
15
+ model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1", trust_remote_code=True)
 
16
 
17
  def modelFeedback(ats_score, resume_data, job_description):
18
  """