Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ from source import Source
|
|
19 |
from scrape_sources import NPRLite, CNNText, stub
|
20 |
|
21 |
|
22 |
-
|
23 |
def initialize(limit, rando, use_cache=True):
|
24 |
clusters: dict[str:List[namedtuple]] = dict()
|
25 |
# This is a container for the source classes.
|
@@ -304,7 +304,9 @@ with st.form(key='columns_in_form'):
|
|
304 |
|
305 |
# Issues section: search for known problems with summaries
|
306 |
|
307 |
-
st.header("
|
|
|
|
|
308 |
st.subheader("Repetition:")
|
309 |
rep_check = check_for_word_and_word(digestor.text)
|
310 |
if rep_check is not None:
|
@@ -317,8 +319,9 @@ with st.form(key='columns_in_form'):
|
|
317 |
|
318 |
# Same article from different sources
|
319 |
st.subheader("Text redundancy: ")
|
320 |
-
for each in
|
321 |
# check if two source articles share a cluster and not a source.
|
322 |
-
|
323 |
-
|
|
|
324 |
|
|
|
19 |
from scrape_sources import NPRLite, CNNText, stub
|
20 |
|
21 |
|
22 |
+
@st.cache()
|
23 |
def initialize(limit, rando, use_cache=True):
|
24 |
clusters: dict[str:List[namedtuple]] = dict()
|
25 |
# This is a container for the source classes.
|
|
|
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:
|
|
|
319 |
|
320 |
# Same article from different sources
|
321 |
st.subheader("Text redundancy: ")
|
322 |
+
for each in selections:
|
323 |
# check if two source articles share a cluster and not a source.
|
324 |
+
st.write(clusters[each])
|
325 |
+
|
326 |
+
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.")
|
327 |
|