Spaces:
Running
Running
Update model.py
Browse files
model.py
CHANGED
@@ -22,8 +22,9 @@ def modelFeedback(ats_score, resume_data):
|
|
22 |
input_ids = tokenizer(input_prompt, return_tensors="pt").input_ids
|
23 |
input_length = input_ids.shape[1]
|
24 |
|
|
|
25 |
|
26 |
-
# Generate response
|
27 |
-
response = generator(input_prompt, num_return_sequences=1)
|
28 |
|
29 |
-
return response
|
|
|
22 |
input_ids = tokenizer(input_prompt, return_tensors="pt").input_ids
|
23 |
input_length = input_ids.shape[1]
|
24 |
|
25 |
+
print(f"Input length: {input_length}")
|
26 |
|
27 |
+
# Generate response with max_new_tokens instead of max_length
|
28 |
+
response = generator(input_prompt, max_new_tokens=150, num_return_sequences=1)
|
29 |
|
30 |
+
return response[0]['generated_text']
|