Spaces:
Runtime error
Runtime error
ncoop57
commited on
Commit
·
05c8b63
1
Parent(s):
caf7eff
Fix syntnax
Browse files- utils/hf_model.py +1 -1
utils/hf_model.py
CHANGED
@@ -11,7 +11,7 @@ class HFModel:
|
|
11 |
prompt = request.get("prompt")
|
12 |
input_ids = self.tokenizer.encode(prompt, return_tensors='pt')
|
13 |
choices = self.model.generate(input_ids, max_length=50, do_sample=True)
|
14 |
-
choices self.tokenizer.decode(choices, skip_special_tokens=True)
|
15 |
completion = {
|
16 |
'id': None, # fill in
|
17 |
'model': 'codegen',
|
|
|
11 |
prompt = request.get("prompt")
|
12 |
input_ids = self.tokenizer.encode(prompt, return_tensors='pt')
|
13 |
choices = self.model.generate(input_ids, max_length=50, do_sample=True)
|
14 |
+
choices = self.tokenizer.decode(choices, skip_special_tokens=True)
|
15 |
completion = {
|
16 |
'id': None, # fill in
|
17 |
'model': 'codegen',
|