Spaces:
Runtime error
Runtime error
geraskalnas
commited on
Commit
•
fb0966f
1
Parent(s):
2a1c043
use LukasStankevicius/t5-base-lithuanian-news-summaries-175 model for aggregation
Browse files
app.py
CHANGED
@@ -62,6 +62,7 @@ nltk.download("popular", force=True, quiet=True)
|
|
62 |
|
63 |
# Constants & Globals
|
64 |
MODEL_OPTIONS = [
|
|
|
65 |
"pszemraj/long-t5-tglobal-base-16384-book-summary",
|
66 |
"pszemraj/long-t5-tglobal-base-sci-simplify",
|
67 |
"pszemraj/long-t5-tglobal-base-sci-simplify-elife",
|
@@ -78,12 +79,12 @@ TOKEN_BATCH_OPTIONS = [
|
|
78 |
] # token batch sizes users can choose from
|
79 |
|
80 |
SUMMARY_PLACEHOLDER = "<p><em>Output will appear below:</em></p>"
|
81 |
-
AGGREGATE_MODEL = "
|
82 |
|
83 |
# if duplicating space: uncomment this line to adjust the max words
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
aggregator = BatchAggregator(
|
89 |
AGGREGATE_MODEL, force_cpu=os.environ.get("APP_AGG_FORCE_CPU", False)
|
|
|
62 |
|
63 |
# Constants & Globals
|
64 |
MODEL_OPTIONS = [
|
65 |
+
"LukasStankevicius/t5-base-lithuanian-news-summaries-175"
|
66 |
"pszemraj/long-t5-tglobal-base-16384-book-summary",
|
67 |
"pszemraj/long-t5-tglobal-base-sci-simplify",
|
68 |
"pszemraj/long-t5-tglobal-base-sci-simplify-elife",
|
|
|
79 |
] # token batch sizes users can choose from
|
80 |
|
81 |
SUMMARY_PLACEHOLDER = "<p><em>Output will appear below:</em></p>"
|
82 |
+
AGGREGATE_MODEL = "LukasStankevicius/t5-base-lithuanian-news-summaries-175" # model to use for aggregation
|
83 |
|
84 |
# if duplicating space: uncomment this line to adjust the max words
|
85 |
+
os.environ["APP_MAX_WORDS"] = str(2048) # set the max words to 2048
|
86 |
+
os.environ["APP_OCR_MAX_PAGES"] = str(40) # set the max pages to 40
|
87 |
+
os.environ["APP_AGG_FORCE_CPU"] = str(1) # force cpu for aggregation
|
88 |
|
89 |
aggregator = BatchAggregator(
|
90 |
AGGREGATE_MODEL, force_cpu=os.environ.get("APP_AGG_FORCE_CPU", False)
|