owaiskha9654
commited on
Commit
β’
cd334dd
1
Parent(s):
2b5c84a
Update app.py
Browse files
app.py
CHANGED
@@ -21,20 +21,20 @@ def Multi_Label_Classification_of_Pubmed_Articles(model_input: str) -> Dict[str,
|
|
21 |
pred_label = torch.sigmoid(b_logit_pred)
|
22 |
|
23 |
ret ={
|
24 |
-
"Anatomy [A]": float(pred_label[
|
25 |
-
"Organisms [B]": float(pred_label[
|
26 |
-
"Diseases [C]": float(pred_label[
|
27 |
-
"Chemicals and Drugs [D]": float(pred_label[
|
28 |
"Analytical, Diagnostic and Therapeutic Techniques, and Equipment [E]": float(pred_label[0][4]),
|
29 |
-
"Psychiatry and Psychology [F]": float(pred_label[
|
30 |
-
"Phenomena and Processes [G]": float(pred_label[
|
31 |
-
"Disciplines and Occupations [H]": float(pred_label[
|
32 |
"Anthropology, Education, Sociology, and Social Phenomena [I]": float(pred_label[0][8]),
|
33 |
-
"Technology, Industry, and Agriculture [J]": float(pred_label[
|
34 |
-
"Information Science [L]": float(pred_label[
|
35 |
-
"Named Groups [M]": float(pred_label[
|
36 |
-
"Health Care [N]": float(pred_label[
|
37 |
-
"Geographicals [Z]": float(pred_label[
|
38 |
return ret
|
39 |
|
40 |
|
|
|
21 |
pred_label = torch.sigmoid(b_logit_pred)
|
22 |
|
23 |
ret ={
|
24 |
+
"Anatomy [A]": float(pred_label[10][0]),
|
25 |
+
"Organisms [B]": float(pred_label[10][1]),
|
26 |
+
"Diseases [C]": float(pred_label[10][2]),
|
27 |
+
"Chemicals and Drugs [D]": float(pred_label[10][3]),
|
28 |
"Analytical, Diagnostic and Therapeutic Techniques, and Equipment [E]": float(pred_label[0][4]),
|
29 |
+
"Psychiatry and Psychology [F]": float(pred_label[10][5]),
|
30 |
+
"Phenomena and Processes [G]": float(pred_label[10][6]),
|
31 |
+
"Disciplines and Occupations [H]": float(pred_label[10][7]),
|
32 |
"Anthropology, Education, Sociology, and Social Phenomena [I]": float(pred_label[0][8]),
|
33 |
+
"Technology, Industry, and Agriculture [J]": float(pred_label[10][9]),
|
34 |
+
"Information Science [L]": float(pred_label[10][10]),
|
35 |
+
"Named Groups [M]": float(pred_label[10][11]),
|
36 |
+
"Health Care [N]": float(pred_label[10][12]),
|
37 |
+
"Geographicals [Z]": float(pred_label[10][13])}
|
38 |
return ret
|
39 |
|
40 |
|