app1 / app.py
nebiyu29's picture
Update app.py
daeb2f3
raw
history blame contribute delete
450 Bytes
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)