Spaces:
Sleeping
Sleeping
app.py
CHANGED
|
@@ -77,7 +77,7 @@ def summarize_text(input_text, model_label, char_limit):
|
|
| 77 |
|
| 78 |
summary_ids = model.generate(
|
| 79 |
input_ids,
|
| 80 |
-
max_length=
|
| 81 |
min_length=5,
|
| 82 |
do_sample=False
|
| 83 |
)
|
|
@@ -91,7 +91,7 @@ iface = gr.Interface(
|
|
| 91 |
inputs=[
|
| 92 |
gr.Textbox(lines=6, label="Enter text to summarize"),
|
| 93 |
gr.Dropdown(choices=list(model_choices.keys()), label="Choose summarization model", value="Pegasus (google/pegasus-xsum)"),
|
| 94 |
-
gr.Slider(minimum=
|
| 95 |
],
|
| 96 |
outputs=gr.Textbox(lines=3, label="Summary (truncated to character limit)"),
|
| 97 |
title="Multi-Model Text Summarizer (GPU Ready)",
|
|
|
|
| 77 |
|
| 78 |
summary_ids = model.generate(
|
| 79 |
input_ids,
|
| 80 |
+
max_length=20,
|
| 81 |
min_length=5,
|
| 82 |
do_sample=False
|
| 83 |
)
|
|
|
|
| 91 |
inputs=[
|
| 92 |
gr.Textbox(lines=6, label="Enter text to summarize"),
|
| 93 |
gr.Dropdown(choices=list(model_choices.keys()), label="Choose summarization model", value="Pegasus (google/pegasus-xsum)"),
|
| 94 |
+
gr.Slider(minimum=10, maximum=100, value=65, step=1, label="Max Character Limit")
|
| 95 |
],
|
| 96 |
outputs=gr.Textbox(lines=3, label="Summary (truncated to character limit)"),
|
| 97 |
title="Multi-Model Text Summarizer (GPU Ready)",
|