apps / app.py
karthickg12's picture
Update app.py
17f5d0b verified
raw
history blame
503 Bytes
import streamlit as st
from transformers import pipeline
col1, col2 = st.columns(2)
with col1:
x=st.button("Sentiment Analysis")
with col2;
y=st.button("Text Summarization")
if x:
pipe=pipeline("sentiment-analysis")
t=st.text_area("Enter the Text")
st.write(pipe(t))
if y:
summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-base", framework="tf")
t1=st.text_area("Enter the Text for Summarization")
st.write(summarizer(t1))