Spaces:
Sleeping
Sleeping
import streamlit | |
from transformers.pipelines import pipeline | |
# Use a pipeline as a high-level helper | |
pipe = pipeline("zero-shot-classification", model="knowledgator/comprehend_it-base") | |
candidate_labels = ['travel', 'cooking', 'dancing', 'exploration'] | |
st.write(classifier(sequence_to_classify, candidate_labels, multi_label=True)) | |
#{'labels': ['travel', 'exploration', 'dancing', 'cooking'], | |
# 'scores': [0.9945111274719238, | |
# 0.9383890628814697, | |
# 0.0057061901316046715, | |
# 0.0018193122232332826], | |
# 'sequence': 'one day I will see the world'} | |