aisafe commited on
Commit
736c9cf
·
verified ·
1 Parent(s): 203cc33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -704,8 +704,8 @@ class SentenceAnalyzer:
704
  attribution_df1 = process_integrated_gradients(split_sentence, self._gpt2tokenizer, self.model)
705
  if i < len(self.split_sentences) - 1:
706
  # Add a row with [PAUSE] and value 0 at the end
707
- # pause_row = pd.DataFrame({'token': '[PAUSE]', 'importance_value': 0},index=[len(attribution_df1)])
708
- pause_row = pd.DataFrame({'', '': 0},index=[len(attribution_df1)])
709
  attribution_df1 = pd.concat([attribution_df1,pause_row], ignore_index=True)
710
 
711
  dataframes_list.append(attribution_df1)
 
704
  attribution_df1 = process_integrated_gradients(split_sentence, self._gpt2tokenizer, self.model)
705
  if i < len(self.split_sentences) - 1:
706
  # Add a row with [PAUSE] and value 0 at the end
707
+ pause_row = pd.DataFrame({'token': '[PAUSE]', 'importance_value': 0},index=[len(attribution_df1)])
708
+ # pause_row = pd.DataFrame({'', '': 0},index=[len(attribution_df1)])
709
  attribution_df1 = pd.concat([attribution_df1,pause_row], ignore_index=True)
710
 
711
  dataframes_list.append(attribution_df1)