text-to-image / app.py
smfry010's picture
Update app.py
3ce224a
raw
history blame contribute delete
500 Bytes
import streamlit as st
from transformers import pipeline
# SENTIMENT ANALYSIS
# sentimizer = pipeline('sentiment-analysis')
# text = st.text_area('enter some text:')
# if text:
# out = sentimizer(text)
# st.json(out)
# TEXT SUMMARIZATION
summarizer = pipeline("summarization", model="stevhliu/my_awesome_billsum_model")
text = st.text_area('Enter a long body of text to summarize:')
if text:
# st.json(summarizer(text))
out = summarizer(text)
st.write(out[0]['summary_text'])