rmdemotest / app.py
rmaitest's picture
Update app.py
8da07e0 verified
raw
history blame contribute delete
349 Bytes
import streamlit as st
from transformers import pipeline
# Load the text classification pipeline
classifier = pipeline("text-classification")
# Create a text input field
text = st.text_input("Enter a sentence:")
if text:
# Process the text using the pipeline
output = classifier(text)
# Display the output as JSON
st.json(output)