Spaces:
Runtime error
Runtime error
Jason Surya
commited on
Commit
•
dfdd890
1
Parent(s):
a69a6d2
fixes
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ 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 |
|
@@ -23,8 +24,8 @@ def main():
|
|
23 |
''', height = 180)
|
24 |
|
25 |
if st.button('Summarize'):
|
26 |
-
st.write("TEST")
|
27 |
-
|
28 |
|
29 |
if __name__=="__main__":
|
30 |
main()
|
|
|
5 |
summarized_text = summarizer(txt)[0]["summary_text"]
|
6 |
return summarized_text
|
7 |
|
8 |
+
@st.cache_resource
|
9 |
def load_summarizer():
|
10 |
return pipeline("summarization", model = "jasonsurya0/BART_TWELVE")
|
11 |
|
|
|
24 |
''', height = 180)
|
25 |
|
26 |
if st.button('Summarize'):
|
27 |
+
# st.write("TEST")
|
28 |
+
st.text_area('Summarized Text', summarizeText(summarizer, txt), height = 140)
|
29 |
|
30 |
if __name__=="__main__":
|
31 |
main()
|