nickmuchi commited on
Commit
3b92b2a
1 Parent(s): f468e9d

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +2 -6
functions.py CHANGED
@@ -470,8 +470,6 @@ def highlight_entities(article_content,summary_output):
470
 
471
  matched_entities, unmatched_entities = get_and_compare_entities(article_content,summary_output)
472
 
473
- print(summary_output)
474
-
475
  for entity in matched_entities:
476
  summary_output = re.sub(f'({entity})(?![^rgb\(]*\))',markdown_start_green + entity + markdown_end,summary_output)
477
 
@@ -479,10 +477,7 @@ def highlight_entities(article_content,summary_output):
479
  summary_output = re.sub(f'({entity})(?![^rgb\(]*\))',markdown_start_red + entity + markdown_end,summary_output)
480
 
481
  print("")
482
- print(summary_output)
483
-
484
  print("")
485
- print(summary_output)
486
 
487
  soup = BeautifulSoup(summary_output, features="html.parser")
488
 
@@ -521,7 +516,8 @@ def generate_eval(raw_text, N, chunk):
521
  eval_set.append(qa)
522
  ques_update.info(f"Creating Question: {i+1}")
523
 
524
- except:
 
525
  st.warning(f'Error in generating Question: {i+1}...', icon="⚠️")
526
  continue
527
 
 
470
 
471
  matched_entities, unmatched_entities = get_and_compare_entities(article_content,summary_output)
472
 
 
 
473
  for entity in matched_entities:
474
  summary_output = re.sub(f'({entity})(?![^rgb\(]*\))',markdown_start_green + entity + markdown_end,summary_output)
475
 
 
477
  summary_output = re.sub(f'({entity})(?![^rgb\(]*\))',markdown_start_red + entity + markdown_end,summary_output)
478
 
479
  print("")
 
 
480
  print("")
 
481
 
482
  soup = BeautifulSoup(summary_output, features="html.parser")
483
 
 
516
  eval_set.append(qa)
517
  ques_update.info(f"Creating Question: {i+1}")
518
 
519
+ except Exception as e:
520
+ print(e)
521
  st.warning(f'Error in generating Question: {i+1}...', icon="⚠️")
522
  continue
523