green commited on
Commit
cd5196e
1 Parent(s): 50dabf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -21
app.py CHANGED
@@ -278,7 +278,8 @@ with st.form(key='columns_in_form'):
278
  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.")
279
  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!")
280
  st.write("You'll also see a graph showing, for each article and summary, the original and summarized lengths.")
281
- 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!")
 
282
  digestor.digest() # creates summaries and stores them associated with the digest
283
 
284
 
@@ -304,26 +305,26 @@ with st.form(key='columns_in_form'):
304
 
305
  # Issues section: search for known problems with summaries
306
 
307
- st.header("Things to look for: ")
308
- st.subheader("Factfulness:")
309
- st.write("Automatically checking the truthfulness of a document isn't a trivial task, and is not implemented here. Users are encouraged to use their own wider knowledge to look for possible falsehoods. In the normal news a reader is understood to have a certain amount of understanding to comprehend the news. This experimental application requires a bit more, but seems promising.")
310
- st.subheader("Repetition:")
311
- rep_check = check_for_word_and_word(digestor.text)
312
- if rep_check is not None:
313
- st.write(f"Following phrases repeat: {rep_check}")
314
- found_index = digestor.text.find(rep_check)
315
- st.write("Sample:")
316
- st.write(f"{text[found_index-40:found_index+40]}")
317
- else:
318
- st.write("No repetition detected.")
319
-
320
  # Same article from different sources
321
- st.subheader("Text redundancy: ")
322
- for each in selections:
323
- if each != 'None':
324
- # check if two source articles share a cluster and not a source.
325
- for i in clusters[each]:
326
- st.write(i[3].source_name)
327
 
328
- st.write("If more than one source have their own versions of the same topic from the same perspective, the result may be repetitive, or it may add nuance and the two summaries may complement each other.")
329
 
 
278
  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.")
279
  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!")
280
  st.write("You'll also see a graph showing, for each article and summary, the original and summarized lengths.")
281
+ st.alert("Remember: This only demos news article summarization. It is not yet completely reliable, and may distort some facts. An analysis of factfulness is in progress by the app creator.")
282
+ # 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!")
283
  digestor.digest() # creates summaries and stores them associated with the digest
284
 
285
 
 
305
 
306
  # Issues section: search for known problems with summaries
307
 
308
+ # st.header("Things to look for: ")
309
+ # st.subheader("Factfulness:")
310
+ # st.write("Automatically checking the truthfulness of a document isn't a trivial task, and is not implemented here. Users are encouraged to use their own wider knowledge to look for possible falsehoods. In the normal news a reader is understood to have a certain amount of understanding to comprehend the news. This experimental application requires a bit more, but seems promising.")
311
+ #st.subheader("Repetition:")
312
+ #rep_check = check_for_word_and_word(digestor.text)
313
+ #if rep_check is not None:
314
+ # st.write(f"Following phrases repeat: {rep_check}")
315
+ # found_index = digestor.text.find(rep_check)
316
+ # st.write("Sample:")
317
+ # st.write(f"{text[found_index-40:found_index+40]}")
318
+ #else:
319
+ # st.write("No repetition detected.")
320
+ #
321
  # Same article from different sources
322
+ # st.subheader("Text redundancy: ")
323
+ # for each in selections:
324
+ # if each != 'None':
325
+ # # check if two source articles share a cluster and not a source.
326
+ # for i in clusters[each]:
327
+ # st.write(i[3].source_name)
328
 
329
+ # st.write("If more than one source have their own versions of the same topic from the same perspective, the result may be repetitive, or it may add nuance and the two summaries may complement each other.")
330