Resolve merge conflicts
Browse files
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)
|