import streamlit as st | |
from transformers import pipeline | |
# Create a zero-shot classification pipeline | |
classifier = pipeline("zero-shot-classification", model="MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli") | |
# Candidate labels | |
candidate_labels = ["science", "technology", "history"] | |
# Sequence to classify | |
sequence_to_classify = st.text_input() | |
# Classify the sequence | |
output = classifier(sequence_to_classify, candidate_labels) | |
st.write(output) | |