owaiskha9654
commited on
Commit
β’
9ea6fb2
1
Parent(s):
4a8af63
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def Multi_Label_Classification_of_Pubmed_Articles(model_input: str) -> Dict[str,
|
|
16 |
|
17 |
# Encoding input data
|
18 |
encodings = tokenizer.batch_encode_plus(model_input,max_length=1024,padding=True,truncation=True) # tokenizer's encoding method
|
19 |
-
outs = model(torch.tensor(encodings['input_ids'])
|
20 |
b_logit_pred = outs[0]
|
21 |
pred_label = torch.sigmoid(b_logit_pred)
|
22 |
|
@@ -74,6 +74,7 @@ article = (
|
|
74 |
)
|
75 |
|
76 |
|
|
|
77 |
app = gr.Interface(
|
78 |
Multi_Label_Classification_of_Pubmed_Articles,
|
79 |
inputs=model_input,
|
|
|
16 |
|
17 |
# Encoding input data
|
18 |
encodings = tokenizer.batch_encode_plus(model_input,max_length=1024,padding=True,truncation=True) # tokenizer's encoding method
|
19 |
+
outs = model(torch.tensor(encodings['input_ids']), token_type_ids=None, attention_mask=torch.tensor(encodings['attention_mask']))
|
20 |
b_logit_pred = outs[0]
|
21 |
pred_label = torch.sigmoid(b_logit_pred)
|
22 |
|
|
|
74 |
)
|
75 |
|
76 |
|
77 |
+
|
78 |
app = gr.Interface(
|
79 |
Multi_Label_Classification_of_Pubmed_Articles,
|
80 |
inputs=model_input,
|