Spaces:
Sleeping
Sleeping
File size: 771 Bytes
b560784 a97191b 7850de7 e43a9a5 00956db e43a9a5 bf71f96 b560784 bf71f96 e543504 bf71f96 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import streamlit as st
from transformers.pipelines import pipeline
# Use a pipeline as a high-level helper
classifier = pipeline("zero-shot-classification", model="knowledgator/comprehend_it-base")
candidate_labels = ['Lecture quality', 'lecturer teaching strength', 'assignments given', 'comments on lecturers teaching venue','Lecturers test and exam grading']
sequence_to_classify = "I hate Mr Thomas class, he doesn't teach well and he doesn't give assignments"
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'}
|