Spaces:
Sleeping
Sleeping
File size: 503 Bytes
06d98e9 17f5d0b 06d98e9 17f5d0b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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))
|