Spaces:
Sleeping
Sleeping
File size: 349 Bytes
b0a18cd 2723787 8da07e0 2723787 b0a18cd 8da07e0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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) |