Ajout du handler et des requirements pour l'API d'inférence
Browse files- handler.py +1 -1
- requirements.txt +1 -0
handler.py
CHANGED
|
@@ -87,4 +87,4 @@ class InferenceHandler:
|
|
| 87 |
labels = {0: "Animaux", 1: "Capitales"}
|
| 88 |
predicted_label = labels.get(prediction, "Inconnu")
|
| 89 |
|
| 90 |
-
return [{"label": predicted_label, "score": outputs.softmax(dim=1)[0][prediction].item()}]
|
|
|
|
| 87 |
labels = {0: "Animaux", 1: "Capitales"}
|
| 88 |
predicted_label = labels.get(prediction, "Inconnu")
|
| 89 |
|
| 90 |
+
return [{"label": predicted_label, "score": outputs.softmax(dim=1)[0][prediction].item()}]
|
requirements.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
|
|
|
| 1 |
torch
|
|
|
|
| 1 |
+
|
| 2 |
torch
|