Spaces:
Runtime error
Runtime error
Eunchan Lee
commited on
Commit
·
d6c20bd
1
Parent(s):
2df8887
ver-new-1
Browse files
app.py
CHANGED
@@ -10,14 +10,19 @@ from transformers import pipeline
|
|
10 |
#from transformers import
|
11 |
st.header("KNU- Abstractive Summarizer Machine!")
|
12 |
|
13 |
-
st.write("Information")
|
14 |
-
st.write("__Inputs__: Text your input article!!")
|
15 |
-
st.write("__Outputs__: Summarizing output text by Google-Pegasus! ")
|
16 |
|
17 |
|
|
|
|
|
18 |
plms =["facebook/bart-large-cnn", "google/pegasus-xsum", "t5-base" ]
|
19 |
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
def load_plms(model_name):
|
22 |
#model_name = "google/pegasus-xsum"
|
23 |
summarizer = pipeline(task="summarization", model=model_name)
|
@@ -56,13 +61,13 @@ output_text = []
|
|
56 |
if submit_button:
|
57 |
with st.spinner('On summarizing !...wait a second please..'):
|
58 |
output_text.append(get_summarizer(summarizer_1, text_input, 150, 5))
|
59 |
-
output_text.append(get_summarizer(summarizer_2, text_input, 150, 5))
|
60 |
-
output_text.append(get_summarizer(summarizer_3, text_input, 150, 5))
|
61 |
|
62 |
|
63 |
st.markdown("### Outputs are here !: ")
|
64 |
|
65 |
-
for i in range(
|
66 |
st.markdown("**"+ plms[i] +"s Output: ** ")
|
67 |
st.text(output_text[i])
|
68 |
st.success(f"{i+1} of 3 are done!")
|
|
|
10 |
#from transformers import
|
11 |
st.header("KNU- Abstractive Summarizer Machine!")
|
12 |
|
|
|
|
|
|
|
13 |
|
14 |
|
15 |
+
#t5: 너무 오래걸린다.
|
16 |
+
|
17 |
plms =["facebook/bart-large-cnn", "google/pegasus-xsum", "t5-base" ]
|
18 |
|
19 |
|
20 |
+
st.write("Information")
|
21 |
+
st.write("__Inputs__: Text your input article!!")
|
22 |
+
st.write("__Outputs__: Summarizing output text by State-of-the-art NLP summarization Models! ")
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
def load_plms(model_name):
|
27 |
#model_name = "google/pegasus-xsum"
|
28 |
summarizer = pipeline(task="summarization", model=model_name)
|
|
|
61 |
if submit_button:
|
62 |
with st.spinner('On summarizing !...wait a second please..'):
|
63 |
output_text.append(get_summarizer(summarizer_1, text_input, 150, 5))
|
64 |
+
#output_text.append(get_summarizer(summarizer_2, text_input, 150, 5))
|
65 |
+
#output_text.append(get_summarizer(summarizer_3, text_input, 150, 5))
|
66 |
|
67 |
|
68 |
st.markdown("### Outputs are here !: ")
|
69 |
|
70 |
+
for i in range(1):
|
71 |
st.markdown("**"+ plms[i] +"s Output: ** ")
|
72 |
st.text(output_text[i])
|
73 |
st.success(f"{i+1} of 3 are done!")
|