owaiskha9654 commited on
Commit
cd334dd
β€’
1 Parent(s): 2b5c84a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
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[0][0]),
25
- "Organisms [B]": float(pred_label[0][1]),
26
- "Diseases [C]": float(pred_label[0][2]),
27
- "Chemicals and Drugs [D]": float(pred_label[0][3]),
28
  "Analytical, Diagnostic and Therapeutic Techniques, and Equipment [E]": float(pred_label[0][4]),
29
- "Psychiatry and Psychology [F]": float(pred_label[0][5]),
30
- "Phenomena and Processes [G]": float(pred_label[0][6]),
31
- "Disciplines and Occupations [H]": float(pred_label[0][7]),
32
  "Anthropology, Education, Sociology, and Social Phenomena [I]": float(pred_label[0][8]),
33
- "Technology, Industry, and Agriculture [J]": float(pred_label[0][9]),
34
- "Information Science [L]": float(pred_label[0][10]),
35
- "Named Groups [M]": float(pred_label[0][11]),
36
- "Health Care [N]": float(pred_label[0][12]),
37
- "Geographicals [Z]": float(pred_label[0][13])}
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