Spaces:
Sleeping
Sleeping
fix round error
Browse files
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 |
-
|
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(
|
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
|