Update app.py
Browse files
app.py
CHANGED
@@ -321,12 +321,19 @@ with st.form(key='columns_in_form'):
|
|
321 |
# st.write("No repetition detected.")
|
322 |
#
|
323 |
# Same article from different sources
|
324 |
-
|
|
|
325 |
for each in selections:
|
326 |
if each != 'None':
|
327 |
# check if two source articles share a cluster and not a source.
|
|
|
328 |
for i in clusters[each]:
|
329 |
-
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
# 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.")
|
332 |
|
|
|
321 |
# st.write("No repetition detected.")
|
322 |
#
|
323 |
# Same article from different sources
|
324 |
+
|
325 |
+
#st.subheader("Text redundancy: ")
|
326 |
for each in selections:
|
327 |
if each != 'None':
|
328 |
# check if two source articles share a cluster and not a source.
|
329 |
+
sources = {}
|
330 |
for i in clusters[each]:
|
331 |
+
if i[3].source_name not in sources:
|
332 |
+
sources[i[3].source_name] = 0
|
333 |
+
else:
|
334 |
+
print("One or more articles on the same topic may have come from different sources. \n\n This may cause redundancy in the digest, though it can also add further clarity, if the two articles are significantly different.")
|
335 |
+
break
|
336 |
+
|
337 |
|
338 |
# 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.")
|
339 |
|