comment_review / app.py
kushan98's picture
Update app.py
9667a67
raw
history blame
446 Bytes
import streamlit as st
from transformers import pipeline
def summarize_text(text):
unmasker = pipeline("text-classification", model = "roberta-large-mnli")
text_input = unmasker(text)
return text_input
def main():
user_input = st.text_area("Input Text Here")
if st.button("Summarize"):
summary = summarize_text(user_input)
st.write("Summary:")
st.write(summary)
if __name__ == "__main__":
main()