owaiskha9654
commited on
Commit
β’
4a8af63
1
Parent(s):
3644b2f
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ tokenizer = BertTokenizer.from_pretrained('owaiskha9654/Multi-Label-Classificati
|
|
15 |
def Multi_Label_Classification_of_Pubmed_Articles(model_input: str) -> Dict[str, float]:
|
16 |
|
17 |
# Encoding input data
|
18 |
-
encodings = tokenizer.batch_encode_plus(
|
19 |
outs = model(torch.tensor(encodings['input_ids']).cuda(), token_type_ids=None, attention_mask=torch.tensor(encodings['attention_mask']).cuda())
|
20 |
b_logit_pred = outs[0]
|
21 |
pred_label = torch.sigmoid(b_logit_pred)
|
@@ -65,7 +65,7 @@ examples = [
|
|
65 |
)
|
66 |
]
|
67 |
|
68 |
-
title = "Multi Label Classification of Pubmed Articles"
|
69 |
description = "The traditional machine learning models give a lot of pain when we do not have sufficient labeled data for the specific task or domain we care about to train a reliable model. Transfer learning allows us to deal with these scenarios by leveraging the already existing labeled data of some related task or domain. We try to store this knowledge gained in solving the source task in the source domain and apply it to our problem of interest. In this work, I have utilized Transfer Learning utilizing BertForSequenceClassification model to fine tune on Pubmed MultiLabel classification Dataset."
|
70 |
article = (
|
71 |
"Author: Owais Ahmad \n"
|
|
|
15 |
def Multi_Label_Classification_of_Pubmed_Articles(model_input: str) -> Dict[str, float]:
|
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']).cuda(), token_type_ids=None, attention_mask=torch.tensor(encodings['attention_mask']).cuda())
|
20 |
b_logit_pred = outs[0]
|
21 |
pred_label = torch.sigmoid(b_logit_pred)
|
|
|
65 |
)
|
66 |
]
|
67 |
|
68 |
+
title = "Thoucentric Paper Night Multi Label Classification of Pubmed Articles"
|
69 |
description = "The traditional machine learning models give a lot of pain when we do not have sufficient labeled data for the specific task or domain we care about to train a reliable model. Transfer learning allows us to deal with these scenarios by leveraging the already existing labeled data of some related task or domain. We try to store this knowledge gained in solving the source task in the source domain and apply it to our problem of interest. In this work, I have utilized Transfer Learning utilizing BertForSequenceClassification model to fine tune on Pubmed MultiLabel classification Dataset."
|
70 |
article = (
|
71 |
"Author: Owais Ahmad \n"
|