Tbruand
commited on
Commit
·
188a80c
1
Parent(s):
4d029c2
test(handler): ajoute un test pour valider la sortie du modèle fine-tuné
Browse files- tests/test_handler.py +10 -1
tests/test_handler.py
CHANGED
|
@@ -24,4 +24,13 @@ def test_few_shot_prediction_output():
|
|
| 24 |
print("Résultat few-shot :", output)
|
| 25 |
|
| 26 |
assert "### Résultat de la classification" in output
|
| 27 |
-
assert "toxique" in output or "non-toxique" in output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
print("Résultat few-shot :", output)
|
| 25 |
|
| 26 |
assert "### Résultat de la classification" in output
|
| 27 |
+
assert "toxique" in output or "non-toxique" in output
|
| 28 |
+
|
| 29 |
+
def test_fine_tuned_prediction_output():
|
| 30 |
+
text = "Tu es stupide"
|
| 31 |
+
output = predict(text, model_type="fine-tuned")
|
| 32 |
+
|
| 33 |
+
print("Résultat fine-tuned :", output)
|
| 34 |
+
|
| 35 |
+
assert "### Résultat de la classification" in output
|
| 36 |
+
assert "toxique" in output or "non-toxique" in output
|