dev_NLP / app.py
ahmadouna's picture
Update app.py
9217748
raw
history blame
403 Bytes
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 {}"
classifier(text, candidate_labels, hypothesis_template=hypothesis_template)