richardorama
commited on
Commit
β’
eac3bfc
1
Parent(s):
fcee72e
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME)
|
|
29 |
st.markdown("<h3 style='text-align: center; font-size: 20px; background-color: white; color: black;'>Text Summarization with BART</h3>", unsafe_allow_html=True)
|
30 |
|
31 |
# Input text area for the article
|
32 |
-
article = st.text_area("Enter
|
33 |
|
34 |
# Summarize button
|
35 |
if st.button("Summarize"):
|
@@ -47,7 +47,8 @@ if st.button("Summarize"):
|
|
47 |
st.write("**Summary:**")
|
48 |
st.write(summary)
|
49 |
else:
|
50 |
-
|
|
|
51 |
|
52 |
|
53 |
################ STATEMENT SUMMARIZATION1 - side bar #################
|
@@ -82,7 +83,7 @@ if STATEMENT:
|
|
82 |
st.write(summary)
|
83 |
else:
|
84 |
st.sidebar.button('Summarize Statement1', disabled=True)
|
85 |
-
st.warning('π Please enter Statement!')
|
86 |
|
87 |
|
88 |
################ STATEMENT SUMMARIZATION - side bar #################
|
@@ -114,7 +115,7 @@ if STATEMENT:
|
|
114 |
#summarize_statement(STATEMENT) # Directly pass the STATEMENT
|
115 |
else:
|
116 |
st.sidebar.button('Summarize Statement', disabled=True)
|
117 |
-
st.warning('π Please enter Statement!')
|
118 |
|
119 |
|
120 |
################ SENTIMENT ANALYSIS - side bar #################
|
|
|
29 |
st.markdown("<h3 style='text-align: center; font-size: 20px; background-color: white; color: black;'>Text Summarization with BART</h3>", unsafe_allow_html=True)
|
30 |
|
31 |
# Input text area for the article
|
32 |
+
article = st.text_area("Enter text to summarize", height=300)
|
33 |
|
34 |
# Summarize button
|
35 |
if st.button("Summarize"):
|
|
|
47 |
st.write("**Summary:**")
|
48 |
st.write(summary)
|
49 |
else:
|
50 |
+
pass
|
51 |
+
#st.warning("Please enter some text to summarize!")
|
52 |
|
53 |
|
54 |
################ STATEMENT SUMMARIZATION1 - side bar #################
|
|
|
83 |
st.write(summary)
|
84 |
else:
|
85 |
st.sidebar.button('Summarize Statement1', disabled=True)
|
86 |
+
#st.warning('π Please enter Statement!')
|
87 |
|
88 |
|
89 |
################ STATEMENT SUMMARIZATION - side bar #################
|
|
|
115 |
#summarize_statement(STATEMENT) # Directly pass the STATEMENT
|
116 |
else:
|
117 |
st.sidebar.button('Summarize Statement', disabled=True)
|
118 |
+
#st.warning('π Please enter Statement!')
|
119 |
|
120 |
|
121 |
################ SENTIMENT ANALYSIS - side bar #################
|