Update app.py
Browse files
app.py
CHANGED
@@ -79,14 +79,14 @@ def proc_submission(
|
|
79 |
tr_in = input_text
|
80 |
msg = None
|
81 |
|
82 |
-
if (summary_type == "TLDR"):
|
83 |
-
_summaries = summarize_via_tokenbatches(
|
84 |
-
tr_in,
|
85 |
-
model_led_tldr if (model_type == "LED") else model_tldr,
|
86 |
-
tokenizer_led_tldr if (model_type == "LED") else tokenizer_tldr,
|
87 |
-
batch_length=token_batch_length,
|
88 |
-
|
89 |
-
)
|
90 |
|
91 |
#else:
|
92 |
#_summaries = summarize_via_tokenbatches(
|
@@ -96,13 +96,13 @@ def proc_submission(
|
|
96 |
#batch_length=token_batch_length,
|
97 |
#**settings_det,
|
98 |
#)
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
sum_text = [f"Section {i}: " + s["summary"][0] for i, s in enumerate(_summaries)]
|
107 |
compression_rate = [
|
108 |
f" - Section {i}: {round(s['compression_rate'],3)}"
|
|
|
79 |
tr_in = input_text
|
80 |
msg = None
|
81 |
|
82 |
+
#if (summary_type == "TLDR"):
|
83 |
+
#_summaries = summarize_via_tokenbatches(
|
84 |
+
#tr_in,
|
85 |
+
#model_led_tldr if (model_type == "LED") else model_tldr,
|
86 |
+
#tokenizer_led_tldr if (model_type == "LED") else tokenizer_tldr,
|
87 |
+
#batch_length=token_batch_length,
|
88 |
+
#**settings_tldr,
|
89 |
+
#)
|
90 |
|
91 |
#else:
|
92 |
#_summaries = summarize_via_tokenbatches(
|
|
|
96 |
#batch_length=token_batch_length,
|
97 |
#**settings_det,
|
98 |
#)
|
99 |
+
_summaries = summarize_via_tokenbatches(
|
100 |
+
tr_in,
|
101 |
+
model_tldr if (summary_type == "TLDR") else model_det,
|
102 |
+
tokenizer_tldr if (summary_type == "TLDR") else tokenizer_det,
|
103 |
+
batch_length=token_batch_length,
|
104 |
+
**settings_tldr if (summary_type == "TLDR") else settings_det,
|
105 |
+
)
|
106 |
sum_text = [f"Section {i}: " + s["summary"][0] for i, s in enumerate(_summaries)]
|
107 |
compression_rate = [
|
108 |
f" - Section {i}: {round(s['compression_rate'],3)}"
|