Quickstart fix
Browse files
README.md
CHANGED
|
@@ -177,6 +177,12 @@ class TurnDetector:
|
|
| 177 |
|
| 178 |
return predicted_label, confidence
|
| 179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
# --- Example Usage ---
|
| 181 |
if __name__ == "__main__":
|
| 182 |
detector = TurnDetector()
|
|
|
|
| 177 |
|
| 178 |
return predicted_label, confidence
|
| 179 |
|
| 180 |
+
def _softmax(self, x, axis=None):
|
| 181 |
+
if axis is None:
|
| 182 |
+
axis = -1
|
| 183 |
+
exp_x = np.exp(x - np.max(x, axis=axis, keepdims=True))
|
| 184 |
+
return exp_x / np.sum(exp_x, axis=axis, keepdims=True)
|
| 185 |
+
|
| 186 |
# --- Example Usage ---
|
| 187 |
if __name__ == "__main__":
|
| 188 |
detector = TurnDetector()
|