Spaces:
Runtime error
Runtime error
File size: 435 Bytes
a6c03b1 c7bffdb a6c03b1 3a30484 a6c03b1 3a30484 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import streamlit as st
from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
st.title("What's the category?")
text = st.text_input("Enter words")
if text is not None:
candidate_labels = ['lifestyle', 'technology', 'entertainment', 'news']
res = classifier("Today is a good day to have a good day", candidate_labels)
st.markdown(f'Well here you go: {res}') |