Spaces:
Sleeping
Sleeping
Update classifier.py
Browse files- classifier.py +1 -1
classifier.py
CHANGED
|
@@ -16,7 +16,7 @@ def classify(tweet, event_model, hftoken, threshold):
|
|
| 16 |
# with onnx pipeline
|
| 17 |
onnx_classifier = opipeline("text-classification", model=event_model, accelerator="ort",
|
| 18 |
batch_size=512, token=hftoken, device="cpu")
|
| 19 |
-
prediction = onnx_classifier(
|
| 20 |
|
| 21 |
|
| 22 |
results["text"] = tweet
|
|
|
|
| 16 |
# with onnx pipeline
|
| 17 |
onnx_classifier = opipeline("text-classification", model=event_model, accelerator="ort",
|
| 18 |
batch_size=512, token=hftoken, device="cpu")
|
| 19 |
+
prediction = onnx_classifier(tweet)[0]
|
| 20 |
|
| 21 |
|
| 22 |
results["text"] = tweet
|