Commit
·
9f5114b
1
Parent(s):
1d06a03
Improving variable names
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -22,8 +22,8 @@ class EndpointHandler():
|
|
22 |
if 'prompt' in data.keys():
|
23 |
text = data['prompt']
|
24 |
else:
|
25 |
-
|
26 |
-
text = self.prompt_ar.format_map({'Question':
|
27 |
|
28 |
input_ids = self.tokenizer(text, return_tensors="pt").input_ids
|
29 |
inputs = input_ids.to(self.device)
|
|
|
22 |
if 'prompt' in data.keys():
|
23 |
text = data['prompt']
|
24 |
else:
|
25 |
+
user_data = data.pop('query',data)
|
26 |
+
text = self.prompt_ar.format_map({'Question':user_data})
|
27 |
|
28 |
input_ids = self.tokenizer(text, return_tensors="pt").input_ids
|
29 |
inputs = input_ids.to(self.device)
|