The kernel appears to have died. It will restart automatically. from transformers import pipeline
Author: splurring
Pull request: no

I am working on the Jupyter Notebook

With the code:

`from transformers import pipeline`

I get:

"The kernel appears to have died. It will restart automatically."

Can someone explain to me what I have to do to fix this? I have already installed tensorflow and transformers.

Comments:
Could you share a colab with a reproducible code example so that we may take a look? Thank you!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.

Hello. I am having this issue as well.

```Python
from transformers import pipeline
import pandas as pd
import numpy as np

task="zero-shot-classification"
model = "facebook/bart-large-mnli"
classifier = pipeline(task, model)

documents = ["string01",
             "string02...",
             "string03..."]

## Candidate Label
candidate_labels = ["crime", "fantasy", "history"]
res = classifier(documents, candidate_labels=candidate_labels)
```

When running the kernel abruptly dies
This is the error shown 
```Markdown
{
	"name": "",
	"message": "",
	"stack": "The Kernel crashed while executing code in the current cell or a previous cell. 
Please review the code in the cell(s) to identify a possible cause of the failure. 
Click <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. 
View Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
}
```

Information about the virtual environment
```markdown
!python --version
Python 3.11.10
```

```Markdown
Package                   Version
------------------------- --------------
transformers              4.46.1
graphviz                  0.20.3
huggingface               0.0.1
huggingface-hub           0.26.2
hugsvision                0.75.5
ipykernel                 6.29.5
ipython                   8.29.0
ipywidgets                8.1.5
Jinja2                    3.1.4
joblib                    1.4.2
jupyter                   1.1.1
jupyter_client            7.4.9
jupyter-console           6.6.3
jupyter_core              5.7.2
jupyter-events            0.10.0
jupyter-lsp               2.2.5
jupyter_server            2.14.2
jupyter_server_terminals  0.5.3
jupyterlab                4.3.0
jupyterlab_pygments       0.3.0
jupyterlab_server         2.27.3
jupyterlab_widgets        3.0.13
MarkupSafe                3.0.2
matplotlib                3.9.2
matplotlib-inline         0.1.7
nb_conda                  2.2.1
nb_conda_kernels          2.5.1
notebook                  6.5.7
notebook_shim             0.2.4
numpy                     1.26.4
pandas                    2.2.3
pickleshare               0.7.5
pillow                    11.0.0
pip                       24.3.1
pure_eval                 0.2.3
PyAudio                   0.2.14
pyparsing                 3.2.0
PySocks                   1.7.1
python-dateutil           2.9.0
python-json-logger        2.0.7
pytorch-lightning         2.4.0
PyYAML                    6.0.2
safetensors               0.4.5
scikit-learn              1.5.2
scipy                     1.14.1
tokenizers                0.20.1
torch                     2.5.1
torch_scatter             2.1.2
torchaudio                2.5.1
torchmetrics              1.5.1
torchtext                 0.18.0
torchvision               0.20.1
torchviz                  0.0.2
```