CoolFace
Apppublic

eklavyaa/intent-classifier

sourceHugging Facebsd-3-clauseupdated 3y agoView on Hugging Face
0likes
app.py19 linesDownload Raw Back to root
1import streamlit as st2from transformers import pipeline3 4# Initialize the model5model_name = "distilbert-base-uncased-finetuned-sst-2-english" # Example model6classifier = pipeline("text-classification", model=model_name)7 8# Streamlit app layout9st.title("Intent Classification App")10 11# Text input12user_input = st.text_input("Enter your text here:")13 14if user_input:15    # Model prediction16    result = classifier(user_input)17    # Display results18    st.write("Intent:", result[0]['label'])19    st.write("Confidence:", result[0]['score'])