NeerAbhy commited on
Commit
3881c06
1 Parent(s): b96b661

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -33,7 +33,8 @@ def load_summarization_model(model_name):
33
  tokenizer = AutoTokenizer.from_pretrained(model_name)
34
  config = AutoConfig.from_pretrained(model_name)
35
 
36
- if max_tokens = config.max_position_embeddings
 
37
  elif hasattr(config, 'n_positions'):
38
  max_tokens = config.n_positions
39
  elif hasattr(config, 'd_model'):
 
33
  tokenizer = AutoTokenizer.from_pretrained(model_name)
34
  config = AutoConfig.from_pretrained(model_name)
35
 
36
+ if hasattr(config, 'max_position_embeddings'):
37
+ max_tokens = config.max_position_embeddings
38
  elif hasattr(config, 'n_positions'):
39
  max_tokens = config.n_positions
40
  elif hasattr(config, 'd_model'):