muzamilhxmi
Create app.py
7b1e257 verified
raw
history blame
611 Bytes
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.")