Spaces:
Runtime error
Runtime error
File size: 413 Bytes
1a80035 8f8b328 1a80035 8f8b328 1a80035 8f8b328 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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)
|