ssocean commited on
Commit
1bff2f0
·
verified ·
1 Parent(s): b404115

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ model.eval()
16
 
17
  @spaces.GPU
18
  def predict(title, abstract):
19
-
20
  text = f'''Given a certain paper, Title: {title}\n Abstract: {abstract}. \n Predict its normalized academic impact (between 0 and 1):'''
21
  inputs = tokenizer(text, return_tensors="pt")
22
  with torch.no_grad():
 
16
 
17
  @spaces.GPU
18
  def predict(title, abstract):
19
+ model.to(device)
20
  text = f'''Given a certain paper, Title: {title}\n Abstract: {abstract}. \n Predict its normalized academic impact (between 0 and 1):'''
21
  inputs = tokenizer(text, return_tensors="pt")
22
  with torch.no_grad():