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