yuntian-deng commited on
Commit
7d315d3
1 Parent(s): a465593

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -75,6 +75,7 @@ Abstract: {abstract}"""
75
  @torch.no_grad()
76
  def model_inference(title, authors, abstract):
77
  text = fill_template(title, authors, abstract)
 
78
  print (text)
79
  inputs = tokenizer([text], return_tensors="pt", truncation=True, max_length=max_length)
80
  if torch.cuda.is_available():
 
75
  @torch.no_grad()
76
  def model_inference(title, authors, abstract):
77
  text = fill_template(title, authors, abstract)
78
+ text = f'[CLS] {text} [SEP]'
79
  print (text)
80
  inputs = tokenizer([text], return_tensors="pt", truncation=True, max_length=max_length)
81
  if torch.cuda.is_available():