Spaces:
Sleeping
Sleeping
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) |