pawlo2013 commited on
Commit
3c9f6b6
·
1 Parent(s): 2a60a24

added the None type check

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -85,7 +85,8 @@ def show_final_layer_attention_maps(
85
  # Forward pass through the model
86
  outputs = model(**tensor, output_attentions=True)
87
 
88
- if outputs.attentions is None:
 
89
  print("Attention outputs are None.")
90
  return None
91
 
 
85
  # Forward pass through the model
86
  outputs = model(**tensor, output_attentions=True)
87
 
88
+ print(type(outputs.attentions[0]))
89
+ if outputs.attentions[0] is None:
90
  print("Attention outputs are None.")
91
  return None
92