Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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():
|