zmbfeng commited on
Commit
4b36f4b
1 Parent(s): 191adf7

commonality check before designate contradiction

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -249,11 +249,13 @@ def contradiction_detection_for_sentence(cd_query):
249
  contradiction_detection_result = contradiction_detection(cd_query, top_sentence[1])
250
 
251
  if contradiction_detection_result == {"Contradiction"}:
252
- st.write("master document page number ",
253
- paragraph_from_sorted_paragraph_scores['original_text']['page_num'])
254
- st.write("master document sentence: ", top_sentence[1])
255
- st.write("secondary document sentence: ", cd_query)
256
- st.write(contradiction_detection_result)
 
 
257
  # st.write(contradiction_detection(st.session_state.premise, top_sentence[1]))
258
 
259
  else:
 
249
  contradiction_detection_result = contradiction_detection(cd_query, top_sentence[1])
250
 
251
  if contradiction_detection_result == {"Contradiction"}:
252
+ if top_sentence[2] >= 0.2:
253
+ st.write("master document page number ",
254
+ paragraph_from_sorted_paragraph_scores['original_text']['page_num'])
255
+ st.write("master document sentence: ", top_sentence[1])
256
+ st.write("secondary document sentence: ", cd_query)
257
+
258
+ st.write(contradiction_detection_result)
259
  # st.write(contradiction_detection(st.session_state.premise, top_sentence[1]))
260
 
261
  else: