Spaces:
Runtime error
Runtime error
Last commit not found
import streamlit as st | |
from transformers import pipeline | |
classifier = pipeline("zero-shot-classification", | |
model="valhalla/distilbart-mnli-12-1") | |
input_text = st.text_area("Enter your sample") | |
input_label = st.text_input("Enter labels", placeholder="support, help, important") | |
labels = input_label.split(',') | |
pred = classifier(input_text, labels, multi_class=True) | |
st.markdown(pred) | |