File size: 371 Bytes
986d727
 
 
d165d2a
 
 
 
 
 
 
 
 
 
986d727
 
d165d2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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")

if text:
    st.json(summarizer(text))