Update app.py
Browse files
app.py
CHANGED
|
@@ -28,12 +28,12 @@ def summarize(txt):
|
|
| 28 |
st.write('\n\n')
|
| 29 |
st.write(txt[:100]) # Display the first 100 characters of the article
|
| 30 |
st.write('--------------------------------------------------------------')
|
| 31 |
-
summary = summarizer(txt, max_length=
|
| 32 |
st.write(summary[0]['summary_text'])
|
| 33 |
|
| 34 |
DEFAULT_STATEMENT = ""
|
| 35 |
# Create a text area for user input
|
| 36 |
-
STATEMENT = st.sidebar.text_area('Enter Statement (String
|
| 37 |
|
| 38 |
# Enable the button only if there is text in the SENTIMENT variable
|
| 39 |
if STATEMENT:
|
|
|
|
| 28 |
st.write('\n\n')
|
| 29 |
st.write(txt[:100]) # Display the first 100 characters of the article
|
| 30 |
st.write('--------------------------------------------------------------')
|
| 31 |
+
summary = summarizer(txt, max_length=500, min_length=30, do_sample=False)
|
| 32 |
st.write(summary[0]['summary_text'])
|
| 33 |
|
| 34 |
DEFAULT_STATEMENT = ""
|
| 35 |
# Create a text area for user input
|
| 36 |
+
STATEMENT = st.sidebar.text_area('Enter Statement (String)', DEFAULT_STATEMENT, height=150)
|
| 37 |
|
| 38 |
# Enable the button only if there is text in the SENTIMENT variable
|
| 39 |
if STATEMENT:
|