File size: 450 Bytes
2ec0a44
 
 
99edd2c
2ec0a44
 
99edd2c
 
 
 
daeb2f3
99edd2c
 
 
 
 
2ec0a44
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

# 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)