File size: 384 Bytes
c303df4
c8f8664
 
d932eba
 
c8f8664
c303df4
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from transformers import pipeline
import gradio as gr #this is in place of the streamlit of the HF video
import torch #this is just like the HF video
import datasets 
evaluate transformers[sentencepiece]


classifier = pipeline("zero-shot-classification")
classifier(
    "This is a course about the Transformers library",
    candidate_labels=["education", "politics", "business"],
)