Spaces:
Sleeping
Sleeping
Update classifier.py
Browse files- classifier.py +1 -1
classifier.py
CHANGED
|
@@ -7,7 +7,7 @@ def classify(tweet, event_model, hftoken, threshold):
|
|
| 7 |
results = {"text": None, "event": None, "score": None}
|
| 8 |
|
| 9 |
# event type prediction with transformers pipeline
|
| 10 |
-
# event_predictor =
|
| 11 |
# batch_size=512, token=hftoken, device="cpu")
|
| 12 |
# tokenizer_kwargs = {'padding': True, 'truncation': True, 'max_length': 512}
|
| 13 |
# prediction = event_predictor(tweet, **tokenizer_kwargs)[0]
|
|
|
|
| 7 |
results = {"text": None, "event": None, "score": None}
|
| 8 |
|
| 9 |
# event type prediction with transformers pipeline
|
| 10 |
+
# event_predictor = tpipeline(task="text-classification", model=event_model,
|
| 11 |
# batch_size=512, token=hftoken, device="cpu")
|
| 12 |
# tokenizer_kwargs = {'padding': True, 'truncation': True, 'max_length': 512}
|
| 13 |
# prediction = event_predictor(tweet, **tokenizer_kwargs)[0]
|