Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -25,6 +25,7 @@ def predict(title, abstract):
|
|
25 |
load_in_8bit=True,)
|
26 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
27 |
model.eval()
|
|
|
28 |
text = f'''Given a certain paper, Title: {title}\n Abstract: {abstract}. \n Predict its normalized academic impact (between 0 and 1):'''
|
29 |
inputs = tokenizer(text, return_tensors="pt").to(device)
|
30 |
with torch.no_grad():
|
|
|
25 |
load_in_8bit=True,)
|
26 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
27 |
model.eval()
|
28 |
+
print(title + '\n' + abstract)
|
29 |
text = f'''Given a certain paper, Title: {title}\n Abstract: {abstract}. \n Predict its normalized academic impact (between 0 and 1):'''
|
30 |
inputs = tokenizer(text, return_tensors="pt").to(device)
|
31 |
with torch.no_grad():
|