|
import streamlit as st |
|
from transformers import pipeline |
|
|
|
|
|
summarizer_ntg = pipeline("text2text-generation", model="mrm8488/t5-base-finetuned-summarize-news") |
|
classifier = pipeline("text-classification", model='Lauraayu/News_Classi_Model', return_all_scores=True) |
|
|
|
|
|
st.title("News Classification") |
|
st.write("Classification for different News types") |
|
|
|
|
|
text = st.text_area("Enter the News to classify","") |
|
|
|
|
|
if st.button("Classify"): |
|
|
|
|
|
result0 = summarizer_ntg(text) |
|
result = classifier(result0) |
|
|
|
st.write(result) |
|
|