File size: 413 Bytes
dee15f4
4753750
 
a964948
 
 
6026d9f
 
fbbacd8
1
2
3
4
5
6
7
8
9

import streamlit as st
from transformers import pipeline
classifier = pipeline("zero-shot-classification",
                      model="morit/french_xlm_xnli")
text = st.text_input('Entrer le texte a analyser') 
candidate_labels = ["commentaire positive", "commentaire negative"]
hypothesis_template = "Cet example estb un {}"
st.write(classifier(text, candidate_labels, hypothesis_template=hypothesis_template))