Update app.py
Browse files
app.py
CHANGED
|
@@ -81,16 +81,16 @@ from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
|
| 81 |
import numpy as np
|
| 82 |
import re
|
| 83 |
|
| 84 |
-
def Sort_Tuple(tup):
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
|
| 90 |
|
| 91 |
-
def softmax(x):
|
| 92 |
-
|
| 93 |
-
|
| 94 |
|
| 95 |
# Load pre-trained model
|
| 96 |
|
|
|
|
| 81 |
import numpy as np
|
| 82 |
import re
|
| 83 |
|
| 84 |
+
# def Sort_Tuple(tup):
|
| 85 |
|
| 86 |
+
# # (Sorts in descending order)
|
| 87 |
+
# tup.sort(key = lambda x: x[1])
|
| 88 |
+
# return tup[::-1]
|
| 89 |
|
| 90 |
|
| 91 |
+
# def softmax(x):
|
| 92 |
+
# exps = np.exp(x)
|
| 93 |
+
# return np.divide(exps, np.sum(exps))
|
| 94 |
|
| 95 |
# Load pre-trained model
|
| 96 |
|