Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,6 @@ logging.basicConfig(
|
|
17 |
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
|
18 |
)
|
19 |
|
20 |
-
|
21 |
def proc_submission(
|
22 |
input_text: str,
|
23 |
model_type: str,
|
@@ -70,22 +69,23 @@ def proc_submission(
|
|
70 |
tr_in = input_text
|
71 |
msg = None
|
72 |
|
73 |
-
if
|
74 |
_summaries = summarize_via_tokenbatches(
|
75 |
tr_in,
|
76 |
-
model_led_tldr if (
|
77 |
-
tokenizer_led_tldr if (
|
78 |
batch_length=token_batch_length,
|
79 |
**settings,
|
80 |
)
|
81 |
-
|
|
|
82 |
_summaries = summarize_via_tokenbatches(
|
83 |
tr_in,
|
84 |
-
|
85 |
-
|
86 |
batch_length=token_batch_length,
|
87 |
**settings,
|
88 |
-
)
|
89 |
#_summaries = summarize_via_tokenbatches(
|
90 |
#tr_in,
|
91 |
#model_tldr if (summary_type == "TLDR") else model_det,
|
|
|
17 |
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
|
18 |
)
|
19 |
|
|
|
20 |
def proc_submission(
|
21 |
input_text: str,
|
22 |
model_type: str,
|
|
|
69 |
tr_in = input_text
|
70 |
msg = None
|
71 |
|
72 |
+
if summary_type == "TLDR":
|
73 |
_summaries = summarize_via_tokenbatches(
|
74 |
tr_in,
|
75 |
+
model_led_tldr if (model_type == "LED") else model_tldr,
|
76 |
+
tokenizer_led_tldr if (model_type == "LED") else tokenizer_tldr,
|
77 |
batch_length=token_batch_length,
|
78 |
**settings,
|
79 |
)
|
80 |
+
|
81 |
+
elif summary_type == "Detailed":
|
82 |
_summaries = summarize_via_tokenbatches(
|
83 |
tr_in,
|
84 |
+
model_led_det if (model_type == "LED") else model_det,
|
85 |
+
tokenizer_led_det if (model_type == "LED") else tokenizer_det,
|
86 |
batch_length=token_batch_length,
|
87 |
**settings,
|
88 |
+
)
|
89 |
#_summaries = summarize_via_tokenbatches(
|
90 |
#tr_in,
|
91 |
#model_tldr if (summary_type == "TLDR") else model_det,
|