oliver-aizip commited on
Commit
f9d275c
·
1 Parent(s): 42dcaee

use chat temploate try 2

Browse files
Files changed (1) hide show
  1. utils/models.py +3 -2
utils/models.py CHANGED
@@ -160,8 +160,9 @@ def run_inference(model_name, context, question):
160
  if generation_interrupt.is_set():
161
  return ""
162
 
163
- outputs = pipe(formatted, **generation_kwargs)
164
- result = outputs[0]['generated_text'][-1]['content']
 
165
 
166
  except Exception as e:
167
  print(f"Error in inference for {model_name}: {e}")
 
160
  if generation_interrupt.is_set():
161
  return ""
162
 
163
+ outputs = pipe(formatted, skip_special_tokens=True, **generation_kwargs, )
164
+ #print(outputs[0]['generated_text'])
165
+ result = outputs[0]['generated_text']
166
 
167
  except Exception as e:
168
  print(f"Error in inference for {model_name}: {e}")