Update app.py
Browse files
app.py
CHANGED
@@ -17,12 +17,12 @@ translation_models = {
|
|
17 |
|
18 |
# Initialize summarization pipelines with specified models
|
19 |
summarization_models = {
|
20 |
-
'Scientific': "
|
21 |
'Literature': "t5-small"
|
22 |
}
|
23 |
|
24 |
# Initialize tokenizer
|
25 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
26 |
|
27 |
# Initialize summarization pipelines
|
28 |
summarizers = {model: pipeline("summarization", model=model) for model in summarization_models.values()}
|
@@ -141,3 +141,4 @@ iface.launch()
|
|
141 |
|
142 |
|
143 |
|
|
|
|
17 |
|
18 |
# Initialize summarization pipelines with specified models
|
19 |
summarization_models = {
|
20 |
+
'Scientific': "facebook/bart-large-cnn",
|
21 |
'Literature': "t5-small"
|
22 |
}
|
23 |
|
24 |
# Initialize tokenizer
|
25 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-cnn") # Using BART tokenizer for the 'Scientific' model
|
26 |
|
27 |
# Initialize summarization pipelines
|
28 |
summarizers = {model: pipeline("summarization", model=model) for model in summarization_models.values()}
|
|
|
141 |
|
142 |
|
143 |
|
144 |
+
|