Spaces:
Runtime error
Runtime error
clean up
Browse files
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
|
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 =
|
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 |
# ---------------------------
|