rrevoid commited on
Commit
0d84089
·
1 Parent(s): 93acac7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -28,8 +28,9 @@ cats = ["Computer Science", "Economics", "Electrical Engineering",
28
 
29
  def predict(outputs):
30
  top = 0
31
- temp = 0.5
32
- probs = nn.functional.softmax(outputs / temp, dim=1).tolist()[0]
 
33
 
34
  top_cats = []
35
  top_probs = []
 
28
 
29
  def predict(outputs):
30
  top = 0
31
+ temp = 30000
32
+ apr_probs = torch.nn.functional.softmax(torch.tensor([39253., 84., 220., 2263., 1214., 909., 66., 10661.]) / temp, dim=0)
33
+ probs = nn.functional.softmax(outputs * apr_probs, dim=1).tolist()[0]
34
 
35
  top_cats = []
36
  top_probs = []