green commited on
Commit
e790551
1 Parent(s): 83d299f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -202,7 +202,7 @@ with st.form(key='columns_in_form'):
202
  if submitted:
203
  st.write("Submitted.\nWhat you'll see:\n\t•The links of the articles being summarized for you digest.\n\t•The digest.\n\t•A graph showing the reduction in articles lengths from original to summary, for each article.\n\t•Some probably issues with the summary.")
204
  selections = [i for i in selections if i is not None]
205
- with st.spinner(text="Digesting...please wait, this will take a few moments...Maybe check some messages or start reading the latest papers on summarization with transformers....\n\nTransformers are so called because they make heavy use of mathematical transformations on the input data, in order to detect contextually related words or phrases in a sentence. \nThis project uses a checkpoint called distilbart-cnn-12-6, created by Sam Shleifer ()."):
206
  chosen = []
207
 
208
  for i in selections: # i is supposed to be a list of stubs, mostly one
@@ -217,6 +217,11 @@ with st.form(key='columns_in_form'):
217
  digestor = Digestor(timer=Timer(), cache = USE_CACHE, stubs=chosen, user_choices=selections)
218
  # happens internally but may be used differently so it isn't automatic upon digestor creation.
219
  # Easily turn caching off for testing.
 
 
 
 
 
220
  digestor.digest() # creates summaries and stores them associated with the digest
221
 
222
 
 
202
  if submitted:
203
  st.write("Submitted.\nWhat you'll see:\n\t•The links of the articles being summarized for you digest.\n\t•The digest.\n\t•A graph showing the reduction in articles lengths from original to summary, for each article.\n\t•Some probably issues with the summary.")
204
  selections = [i for i in selections if i is not None]
205
+ with st.spinner(text="Creating your digest: this will take a few moments."):
206
  chosen = []
207
 
208
  for i in selections: # i is supposed to be a list of stubs, mostly one
 
217
  digestor = Digestor(timer=Timer(), cache = USE_CACHE, stubs=chosen, user_choices=selections)
218
  # happens internally but may be used differently so it isn't automatic upon digestor creation.
219
  # Easily turn caching off for testing.
220
+ st.write("What you'll see:")
221
+ st.write("First you'll see a list of links appear below. These are the links to the original articles being summarized for your digest, so you can get the full story if you're interested, or check the summary against the source.")
222
+ st.write("In a few moments, your machine-generated digest will appear below the links, and below that you'll see an approximate word count of your digest and the time in seconds that the whole process took!")
223
+ st.write("You'll also see a graph showing, for each article and summary, the original and summarized lengths.")
224
+ st.write("Finally, you will see some possible errors detected in the summaries. This area of NLP is far from perfection and always developing. Hopefully this is an interesting step in the path!")
225
  digestor.digest() # creates summaries and stores them associated with the digest
226
 
227