Spaces:
Sleeping
Sleeping
Update model.py
Browse files
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
|
17 |
-
|
18 |
-
|
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 |
"""
|