Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,8 +102,12 @@ The extractive models for this app are using sentence-transformer models, which
|
|
| 102 |
Use this tab to experiment summarization task of text for different types Abstractive models.""")
|
| 103 |
with gr.Row():
|
| 104 |
with gr.Column(scale=4):
|
| 105 |
-
text_baseline_transformer= gr.TextArea(label="Input text to summarize", placeholder="Input summarization"
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
with gr.Column(scale=3):
|
| 108 |
with gr.Row():
|
| 109 |
num_beams = gr.Slider(minimum=2, maximum=10, value=2, step=1, label="Number of Beams")
|
|
@@ -118,11 +122,10 @@ The extractive models for this app are using sentence-transformer models, which
|
|
| 118 |
gr.Markdown("NOTE: First time inference for a new model will take time, since a new model has to downloaded before inference.")
|
| 119 |
gr.Examples([[abstractive_example_text_1
|
| 120 |
, 5,25,120, "Gabriel/bart-base-cnn-swe"],
|
| 121 |
-
[
|
| 122 |
, 5,25,120, "Gabriel/bart-base-cnn-xsum-swe"]
|
| 123 |
], [text_baseline_transformer, num_beams, min_len, max_len, model_in])
|
| 124 |
|
| 125 |
-
|
| 126 |
with gr.TabItem("Extractive Ranking Graph for Summarization"):
|
| 127 |
gr.Markdown(
|
| 128 |
"""Use this tab to experiment summarization task of text with a graph based method (LexRank).""")
|
|
|
|
| 102 |
Use this tab to experiment summarization task of text for different types Abstractive models.""")
|
| 103 |
with gr.Row():
|
| 104 |
with gr.Column(scale=4):
|
| 105 |
+
text_baseline_transformer= gr.TextArea(label="Input text to summarize", placeholder="Input summarization")
|
| 106 |
+
|
| 107 |
+
with gr.Row():
|
| 108 |
+
transformer_button_clear = gr.Button("Clear", variant='secondary')
|
| 109 |
+
transformer_button = gr.Button("Summarize!", variant='primary')
|
| 110 |
+
|
| 111 |
with gr.Column(scale=3):
|
| 112 |
with gr.Row():
|
| 113 |
num_beams = gr.Slider(minimum=2, maximum=10, value=2, step=1, label="Number of Beams")
|
|
|
|
| 122 |
gr.Markdown("NOTE: First time inference for a new model will take time, since a new model has to downloaded before inference.")
|
| 123 |
gr.Examples([[abstractive_example_text_1
|
| 124 |
, 5,25,120, "Gabriel/bart-base-cnn-swe"],
|
| 125 |
+
[abstractive_example_text_2
|
| 126 |
, 5,25,120, "Gabriel/bart-base-cnn-xsum-swe"]
|
| 127 |
], [text_baseline_transformer, num_beams, min_len, max_len, model_in])
|
| 128 |
|
|
|
|
| 129 |
with gr.TabItem("Extractive Ranking Graph for Summarization"):
|
| 130 |
gr.Markdown(
|
| 131 |
"""Use this tab to experiment summarization task of text with a graph based method (LexRank).""")
|