aboltachka commited on
Commit
17b8d53
1 Parent(s): d42f630

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -443,21 +443,13 @@ def rr_detector(title_raw, abstract_raw):
443
 
444
  #FORM THE MAIN OUTPUT
445
  #Output
446
- if result_dict['match_1'] == 1 and tag == "case1":
447
  #Result
448
  output_image = os.path.join(dirname, 'images/yes.png')
449
  #Explanation
450
  unique_group_str = ', '.join(unique_group)
451
  unique_issue_str = ', '.join(unique_issue)
452
- answer = "This paper can be considered race-related, as it mentions at least one group keyword in the title. Furthermore, the algorithm does not identify any whitelist phrases in the title and abstract provided."
453
- elif result_dict['match_1'] == 1 and tag == "case2":
454
- #Result
455
- output_image = os.path.join(dirname, 'images/yes.png')
456
- #Explanation
457
- unique_group_str = ', '.join(unique_group)
458
- unique_issue_str = ', '.join(unique_issue)
459
- answer = "This paper can be considered race-related, as it mentions at least one group keyword AND at least one issue keyword in the title or abstract (excluding the last sentence). Furthermore, the algorithm does not identify any whitelist phrases in the title and abstract provided."
460
-
461
  else:
462
 
463
  if len(blackball_count) > 0:
 
443
 
444
  #FORM THE MAIN OUTPUT
445
  #Output
446
+ if result_dict['match_1'] == 1:
447
  #Result
448
  output_image = os.path.join(dirname, 'images/yes.png')
449
  #Explanation
450
  unique_group_str = ', '.join(unique_group)
451
  unique_issue_str = ', '.join(unique_issue)
452
+ answer = "This paper can be considered race-related, as it mentions at least one group keyword in the title. Or it mentions at least one group keyword AND at least one issue keyword in the title or abstract (excluding the last sentence). Furthermore, the algorithm does not identify any whitelist phrases in the title and abstract provided."
 
 
 
 
 
 
 
 
453
  else:
454
 
455
  if len(blackball_count) > 0: