Spaces:
Sleeping
Sleeping
File size: 611 Bytes
7b1e257 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import streamlit as st
from transformers import pipeline
# Create a pipeline for text classification
pipe = pipeline("text-classification", model="blaikhole/distilbert-review-bug-classifier")
# Streamlit app structure
st.title("Review bug classification demo.")
st.write("Enter some text and the model will predict bug category:")
# Input text from the user
user_input = st.text_input("Input Text:")
# When the button is clicked, classify the input
if st.button("Classify"):
if user_input:
result = pipe(user_input)
st.write(result)
else:
st.write("Please enter some text.")
|