Tonic commited on
Commit
9b11223
β€’
1 Parent(s): cdc4e67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -22,10 +22,10 @@ rm_model = AutoModelForSequenceClassification.from_pretrained('OpenAssistant/rew
22
 
23
  @spaces.GPU
24
  def generate_text(usertitle, content, temperature, max_length, N=3):
25
- msg =[
26
- 'title': {usertitle},
27
- 'content': {content}
28
- ]
29
  # input_text = f"title: {usertitle}\ncontent: {content}"
30
  inputs = tokenizer.apply_chat_template(msg, return_tensors='pt').cuda()
31
  attention_mask = torch.ones(inputs['input_ids'].shape, dtype=torch.long, device='cuda')
 
22
 
23
  @spaces.GPU
24
  def generate_text(usertitle, content, temperature, max_length, N=3):
25
+ msg ={
26
+ 'title': usertitle,
27
+ 'content': content
28
+ }
29
  # input_text = f"title: {usertitle}\ncontent: {content}"
30
  inputs = tokenizer.apply_chat_template(msg, return_tensors='pt').cuda()
31
  attention_mask = torch.ones(inputs['input_ids'].shape, dtype=torch.long, device='cuda')