Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ model = torch.load("pytorch_distilbert_news (4).bin", map_location=torch.device(
|
|
68 |
|
69 |
def get_predict(title, abstract):
|
70 |
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-cased')
|
71 |
-
inputs = tokenizer(title,
|
72 |
outputs = model(
|
73 |
input_ids=inputs['input_ids'],
|
74 |
attention_mask=inputs['attention_mask'],
|
|
|
68 |
|
69 |
def get_predict(title, abstract):
|
70 |
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-cased')
|
71 |
+
inputs = tokenizer(abstract, title, return_tensors="pt")
|
72 |
outputs = model(
|
73 |
input_ids=inputs['input_ids'],
|
74 |
attention_mask=inputs['attention_mask'],
|