Biswajit Padhi commited on
Commit
95073a7
2 Parent(s): c59ccb6 344677b

Resolve merge conflicts

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -21,6 +21,7 @@ def generate(text,max_new_token):
21
  eval_prompt = formatting_func(text)
22
  model_input = eval_tokenizer(eval_prompt, return_tensors="pt").to("cuda")
23
  response = eval_tokenizer.decode(ft_model.generate(**model_input, max_new_tokens=max_new_token)[0], skip_special_tokens=True)
 
24
  if(eval_prompt in response):
25
  response = response.replace(eval_prompt, '')
26
  response = re.sub(r'#+', '', response)
 
21
  eval_prompt = formatting_func(text)
22
  model_input = eval_tokenizer(eval_prompt, return_tensors="pt").to("cuda")
23
  response = eval_tokenizer.decode(ft_model.generate(**model_input, max_new_tokens=max_new_token)[0], skip_special_tokens=True)
24
+
25
  if(eval_prompt in response):
26
  response = response.replace(eval_prompt, '')
27
  response = re.sub(r'#+', '', response)