anonICPC commited on
Commit
b1ebf2f
·
verified ·
1 Parent(s): e626567

fix round error

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -155,7 +155,7 @@ def greet(X, ny):
155
  cnt+=1
156
  val = val - torch.log(probs[idx[cnt]])
157
  val = val/num_sub_tokens_label
158
- val = round(val, 2)
159
 
160
  # print(er)
161
  # astr = ""
@@ -173,7 +173,7 @@ def greet(X, ny):
173
  # astr+=mock
174
  # else:
175
  # astr+=mock.capitalize()
176
- er = er+" (with PLL value of: "+str(val.item())+")"
177
  return er
178
  title = "Rename a variable in a Java class"
179
  description = """This model is a fine-tuned GraphCodeBERT model fine-tuned to output higher-quality variable names for Java classes. Long classes are handled by the
 
155
  cnt+=1
156
  val = val - torch.log(probs[idx[cnt]])
157
  val = val/num_sub_tokens_label
158
+ vali = round(val.item(), 2)
159
 
160
  # print(er)
161
  # astr = ""
 
173
  # astr+=mock
174
  # else:
175
  # astr+=mock.capitalize()
176
+ er = er+" (with PLL value of: "+str(vali)+")"
177
  return er
178
  title = "Rename a variable in a Java class"
179
  description = """This model is a fine-tuned GraphCodeBERT model fine-tuned to output higher-quality variable names for Java classes. Long classes are handled by the