app1 / app.py
nebiyu29's picture
Update app.py
99edd2c
raw
history blame
No virus
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.input_text()
# Classify the sequence
output = classifier(sequence_to_classify, candidate_labels)
st.write(output)