Clemylia commited on
Commit
48885c1
·
verified ·
1 Parent(s): 7d3c8b4

Ajout du handler et des requirements pour l'API d'inférence

Browse files
Files changed (2) hide show
  1. handler.py +1 -1
  2. 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