richardorama commited on
Commit
b4e2d85
β€’
1 Parent(s): a906ccd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -17,17 +17,18 @@ Barrientos, now 39, is facing two criminal counts of "offering a false instrumen
17
  """
18
 
19
  # Create a text area for user input
20
- ARTICLE = st.sidebar.text_area('Article', DEFAULT_ARTICLE, height=150)
21
 
22
  # Define the summarization function
23
  def summarize(txt):
 
24
  st.write(txt[:100]) # Display the first 100 characters of the article
25
  st.write('--------------------------------------------------------------')
26
  summary = summarizer(txt, max_length=130, min_length=30, do_sample=False)
27
  st.write(summary[0]['summary_text'])
28
 
29
  # Create a button and trigger the summarize function when clicked
30
- if st.sidebar.button('Summarize Text'):
31
  summarize(ARTICLE)
32
  else:
33
- st.warning('πŸ‘ˆ Please enter text!')
 
17
  """
18
 
19
  # Create a text area for user input
20
+ ARTICLE = st.sidebar.text_area('Enter Article', DEFAULT_ARTICLE, height=150)
21
 
22
  # Define the summarization function
23
  def summarize(txt):
24
+ st-write('\n\n')
25
  st.write(txt[:100]) # Display the first 100 characters of the article
26
  st.write('--------------------------------------------------------------')
27
  summary = summarizer(txt, max_length=130, min_length=30, do_sample=False)
28
  st.write(summary[0]['summary_text'])
29
 
30
  # Create a button and trigger the summarize function when clicked
31
+ if st.sidebar.button('Summarize Article'):
32
  summarize(ARTICLE)
33
  else:
34
+ st.warning('πŸ‘ˆ Please enter Article!')