Tonic commited on
Commit
4256cab
Β·
verified Β·
1 Parent(s): 729f5d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ def generate_text(usertitle, content, max_length, temperature):
23
  # 'title': title,
24
  # 'content': content
25
  # }]
26
- input_text = [{'title': {usertitle}, 'content': {content}}]
27
  inputs = tokenizer.apply_chat_template(input_text, return_tensors='pt').cuda()
28
  generated_text = tokenizer.decode(model.generate(inputs, max_new_tokens=max_length, temperature=temperature, skip_special_tokens=True, do_sample=True)[0]) #.tokenizer.split(tokenizer.eos_token)[0]
29
 
 
23
  # 'title': title,
24
  # 'content': content
25
  # }]
26
+ input_text = ['title': {usertitle}, 'content': {content}]
27
  inputs = tokenizer.apply_chat_template(input_text, return_tensors='pt').cuda()
28
  generated_text = tokenizer.decode(model.generate(inputs, max_new_tokens=max_length, temperature=temperature, skip_special_tokens=True, do_sample=True)[0]) #.tokenizer.split(tokenizer.eos_token)[0]
29