osanseviero
commited on
Commit
•
6293397
1
Parent(s):
22c18be
Update pipeline.py
Browse files- pipeline.py +1 -0
pipeline.py
CHANGED
@@ -32,6 +32,7 @@ class PreTrainedPipeline():
|
|
32 |
# IMPLEMENT_THIS
|
33 |
# FastAI expects a np array, not a PIL Image.
|
34 |
_, _, preds = self.model.predict(np.array(inputs))
|
|
|
35 |
labels = [
|
36 |
{"label": str(self.id2label["0"]), "score": preds[0]},
|
37 |
{"label": str(self.id2label["1"]), "score": preds[1]},
|
|
|
32 |
# IMPLEMENT_THIS
|
33 |
# FastAI expects a np array, not a PIL Image.
|
34 |
_, _, preds = self.model.predict(np.array(inputs))
|
35 |
+
preds = preds.tolist()
|
36 |
labels = [
|
37 |
{"label": str(self.id2label["0"]), "score": preds[0]},
|
38 |
{"label": str(self.id2label["1"]), "score": preds[1]},
|