Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
-
|
|
|
4 |
col1, col2 = st.columns(2)
|
5 |
|
6 |
with col1:
|
@@ -9,12 +10,10 @@ with col2:
|
|
9 |
y=st.button("Text Summarization")
|
10 |
|
11 |
if x:
|
12 |
-
pipe=pipeline("sentiment-analysis")
|
13 |
t=st.text_area("Enter the Text")
|
14 |
if t:
|
15 |
st.write(pipe(t))
|
16 |
if y:
|
17 |
-
summarizer = pipeline("summarization")
|
18 |
t1=st.text_area("Enter the Text for Summarization")
|
19 |
if t1:
|
20 |
st.write(summarizer(t1))
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
+
summarizer = pipeline("summarization")
|
4 |
+
pipe=pipeline("sentiment-analysis")
|
5 |
col1, col2 = st.columns(2)
|
6 |
|
7 |
with col1:
|
|
|
10 |
y=st.button("Text Summarization")
|
11 |
|
12 |
if x:
|
|
|
13 |
t=st.text_area("Enter the Text")
|
14 |
if t:
|
15 |
st.write(pipe(t))
|
16 |
if y:
|
|
|
17 |
t1=st.text_area("Enter the Text for Summarization")
|
18 |
if t1:
|
19 |
st.write(summarizer(t1))
|