Commit
•
18b7160
1
Parent(s):
d998cf3
Update handler.py
Browse files- handler.py +4 -3
handler.py
CHANGED
@@ -26,9 +26,10 @@ class EndpointHandler():
|
|
26 |
"""
|
27 |
|
28 |
prompts = [f"<human>: {prompt}\n<bot>:" for prompt in data["inputs"]]
|
29 |
-
|
30 |
-
|
31 |
-
inputs = self.tokenizer(prompts, padding=True, return_tensors='pt').to(model.device)
|
|
|
32 |
input_length = inputs.input_ids.shape[1]
|
33 |
outputs = self.model.generate(
|
34 |
**inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.7, top_k=50
|
|
|
26 |
"""
|
27 |
|
28 |
prompts = [f"<human>: {prompt}\n<bot>:" for prompt in data["inputs"]]
|
29 |
+
|
30 |
+
print("prompts")
|
31 |
+
inputs = self.tokenizer(prompts, padding=True, return_tensors='pt').to(self.model.device)
|
32 |
+
raise ValueError(inputs)
|
33 |
input_length = inputs.input_ids.shape[1]
|
34 |
outputs = self.model.generate(
|
35 |
**inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.7, top_k=50
|