Spaces:
Runtime error
Runtime error
Jason Surya commited on
Commit ·
a69a6d2
1
Parent(s): 867afc2
fixes
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
def load_summarizer():
|
| 9 |
return pipeline("summarization", model = "jasonsurya0/BART_TWELVE")
|
| 10 |
|
|
@@ -24,7 +24,6 @@ def main():
|
|
| 24 |
|
| 25 |
if st.button('Summarize'):
|
| 26 |
st.write("TEST")
|
| 27 |
-
#st.write(summarizeText(summarizer, txt))
|
| 28 |
#st.text_area('Summarized Text', summarizeText(summarizer, txt), height = 140)
|
| 29 |
|
| 30 |
if __name__=="__main__":
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
def summarizeText(summarizer, txt):
|
| 5 |
+
summarized_text = summarizer(txt)[0]["summary_text"]
|
| 6 |
+
return summarized_text
|
| 7 |
+
|
| 8 |
def load_summarizer():
|
| 9 |
return pipeline("summarization", model = "jasonsurya0/BART_TWELVE")
|
| 10 |
|
|
|
|
| 24 |
|
| 25 |
if st.button('Summarize'):
|
| 26 |
st.write("TEST")
|
|
|
|
| 27 |
#st.text_area('Summarized Text', summarizeText(summarizer, txt), height = 140)
|
| 28 |
|
| 29 |
if __name__=="__main__":
|