Spaces:
Sleeping
Sleeping
import streamlit as st | |
from transformers import pipeline | |
classifier = pipeline("sentiment-analysis", model="maurosm/bert_classification_model") | |
st.markdown(''' | |
Type an utterance that corresponds to one of the ten intents listed below: | |
* change_shipping_address | |
* complaint | |
* contact_customer_service | |
* create_account | |
* delete_account | |
* edit_account | |
* get_invoice | |
* get_refund | |
* payment_issue | |
* registration_problems | |
For example you could start with the utterance: "I would like to create a new account" | |
The expected intent would be *create_account*.''') | |
text = st.text_area('Type your own utterance below') | |
if text: | |
out = classifier(text) | |
st.json(out) | |