Text Classification
Transformers
PyTorch
TensorBoard
bert
Generated from Trainer
text-embeddings-inference
Instructions to use HCKLab/BiBert-MultiTask-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HCKLab/BiBert-MultiTask-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="HCKLab/BiBert-MultiTask-1")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("HCKLab/BiBert-MultiTask-1") model = AutoModelForSequenceClassification.from_pretrained("HCKLab/BiBert-MultiTask-1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -251,7 +251,7 @@ class EndpointHandler():
|
|
| 251 |
A :obj:`list` | `dict`: will be serialized and returned
|
| 252 |
"""
|
| 253 |
inputs = data.pop("text", data)
|
| 254 |
-
lang = data.pop("lang",
|
| 255 |
if isinstance(inputs, str):
|
| 256 |
inputs = [inputs]
|
| 257 |
|
|
|
|
| 251 |
A :obj:`list` | `dict`: will be serialized and returned
|
| 252 |
"""
|
| 253 |
inputs = data.pop("text", data)
|
| 254 |
+
lang = data.pop("lang", None)
|
| 255 |
if isinstance(inputs, str):
|
| 256 |
inputs = [inputs]
|
| 257 |
|