mlwong commited on
Commit
91c6989
1 Parent(s): d718096
Files changed (1) hide show
  1. npc_bert_models/summary_module.py +3 -1
npc_bert_models/summary_module.py CHANGED
@@ -61,10 +61,11 @@ class NpcBertGPT2():
61
  msg = "Model was not initialized, have you run load()?"
62
  raise BrokenPipeError(msg)
63
 
64
- logger.info(f"Called with arguments {args = }")
65
 
66
  pipe_out, = self.pipeline(*args)
67
  pipe_out = pipe_out['generated_text']
 
68
 
69
  # remove repeated lines by hard coding
70
  mo = re.search("\. (questionable|anterio|zius)", pipe_out)
@@ -72,6 +73,7 @@ class NpcBertGPT2():
72
  if mo is not None:
73
  end_sig = mo.start()
74
  pipe_out = pipe_out[:end_sig + 1]
 
75
  return pipe_out
76
 
77
 
 
61
  msg = "Model was not initialized, have you run load()?"
62
  raise BrokenPipeError(msg)
63
 
64
+ self.logger.info(f"Called with arguments {args = }")
65
 
66
  pipe_out, = self.pipeline(*args)
67
  pipe_out = pipe_out['generated_text']
68
+ self.logger.info(f"Generated text: {pipe_out}")
69
 
70
  # remove repeated lines by hard coding
71
  mo = re.search("\. (questionable|anterio|zius)", pipe_out)
 
73
  if mo is not None:
74
  end_sig = mo.start()
75
  pipe_out = pipe_out[:end_sig + 1]
76
+ self.logger.info(f"Displayed text: {pipe_out}")
77
  return pipe_out
78
 
79