fix some more display issue
Browse files
app.py
CHANGED
@@ -237,11 +237,11 @@ def contradiction_detection_for_sentence(cd_query):
|
|
237 |
|
238 |
sorted_paragraph_scores = sorted(paragraph_scores, key=lambda x: x[0], reverse=True)
|
239 |
|
240 |
-
st.write("Top scored paragraphs and their scores:")
|
241 |
for i, (similarity_score, commonality_score, paragraph_from_sorted_paragraph_scores) in enumerate(
|
242 |
sorted_paragraph_scores[:3]): # number of paragraphs to consider
|
243 |
# st.write("top_three_sentences: ", paragraph['top_three_sentences'])
|
244 |
-
st.write("paragarph number ***", i)
|
245 |
prev_contradiction_detected = True
|
246 |
for top_sentence in paragraph_from_sorted_paragraph_scores['top_three_sentences']:
|
247 |
|
@@ -337,12 +337,12 @@ if 'paragraph_sentence_encodings' in st.session_state:
|
|
337 |
line_list.append((line_number, decoded_line))
|
338 |
|
339 |
# Display the list of tuples
|
340 |
-
st.write("Line Number and Line Content:")
|
341 |
for item in line_list:
|
342 |
-
st.write(f"Line {item[0]}: {item[1]}")
|
343 |
sentences = sent_tokenize(item[1])
|
344 |
for sentence in sentences:
|
345 |
-
st.write(f"sententce {sentence}")
|
346 |
contradiction_detection_for_sentence(sentence)
|
347 |
# print(top_sentence[1])
|
348 |
# st.write(f"Similarity Score: {similarity_score}, Commonality Score: {commonality_score}")
|
|
|
237 |
|
238 |
sorted_paragraph_scores = sorted(paragraph_scores, key=lambda x: x[0], reverse=True)
|
239 |
|
240 |
+
# st.write("Top scored paragraphs and their scores:")
|
241 |
for i, (similarity_score, commonality_score, paragraph_from_sorted_paragraph_scores) in enumerate(
|
242 |
sorted_paragraph_scores[:3]): # number of paragraphs to consider
|
243 |
# st.write("top_three_sentences: ", paragraph['top_three_sentences'])
|
244 |
+
# st.write("paragarph number ***", i)
|
245 |
prev_contradiction_detected = True
|
246 |
for top_sentence in paragraph_from_sorted_paragraph_scores['top_three_sentences']:
|
247 |
|
|
|
337 |
line_list.append((line_number, decoded_line))
|
338 |
|
339 |
# Display the list of tuples
|
340 |
+
# st.write("Line Number and Line Content:")
|
341 |
for item in line_list:
|
342 |
+
# st.write(f"Line {item[0]}: {item[1]}")
|
343 |
sentences = sent_tokenize(item[1])
|
344 |
for sentence in sentences:
|
345 |
+
# st.write(f"sententce {sentence}")
|
346 |
contradiction_detection_for_sentence(sentence)
|
347 |
# print(top_sentence[1])
|
348 |
# st.write(f"Similarity Score: {similarity_score}, Commonality Score: {commonality_score}")
|