Commit
·
6755cf9
1
Parent(s):
0ec27d9
Reduce threshold
Browse files
api.py
CHANGED
|
@@ -40,7 +40,7 @@ def load_model_lstm():
|
|
| 40 |
model = model.to(device)
|
| 41 |
return model, device
|
| 42 |
|
| 43 |
-
def inference(model, device, comments: str | list, threshold: float = 0.
|
| 44 |
if isinstance(comments, str):
|
| 45 |
comments = [comments]
|
| 46 |
elif not isinstance(comments, list):
|
|
|
|
| 40 |
model = model.to(device)
|
| 41 |
return model, device
|
| 42 |
|
| 43 |
+
def inference(model, device, comments: str | list, threshold: float = 0.5):
|
| 44 |
if isinstance(comments, str):
|
| 45 |
comments = [comments]
|
| 46 |
elif not isinstance(comments, list):
|