Gladiator commited on
Commit
d97bcce
1 Parent(s): e6ef955
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,8 +1,7 @@
1
- import torch
2
  import nltk
3
  import validators
4
  import streamlit as st
5
- from transformers import pipeline, T5Tokenizer
6
 
7
  # local modules
8
  from extractive_summarizer.model_processors import Summarizer
@@ -32,7 +31,7 @@ if __name__ == "__main__":
32
  nltk.download("punkt")
33
  abs_tokenizer_name = "facebook/bart-large-cnn"
34
  abs_model_name = "facebook/bart-large-cnn"
35
- abs_tokenizer = T5Tokenizer.from_pretrained(abs_tokenizer_name)
36
  abs_max_length = 100
37
  abs_min_length = 30
38
  # ---------------------------
 
 
1
  import nltk
2
  import validators
3
  import streamlit as st
4
+ from transformers import AutoTokenizer, pipeline
5
 
6
  # local modules
7
  from extractive_summarizer.model_processors import Summarizer
 
31
  nltk.download("punkt")
32
  abs_tokenizer_name = "facebook/bart-large-cnn"
33
  abs_model_name = "facebook/bart-large-cnn"
34
+ abs_tokenizer = AutoTokenizer.from_pretrained(abs_tokenizer_name)
35
  abs_max_length = 100
36
  abs_min_length = 30
37
  # ---------------------------