Gabriel commited on
Commit
dae11ca
1 Parent(s): a9040a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -18
app.py CHANGED
@@ -71,24 +71,7 @@ with gr.Blocks() as demo:
71
  gr.Markdown(sum_app_text_tab_1)
72
 
73
  with gr.TabItem("The Summarization Engine"):
74
- gr.Markdown("""
75
- <h3>Abstractive vs Extractive</h3>
76
- <p>
77
- Abstractive
78
- The underlying engines for the Abstractive part are transformer based model BART, a sequence-to-sequence model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. The BART-model was pre-trained by KBLab/bart-base-swedish-cased (link) to learn general knowledge about language. Afterwards, the model was further fine-tuned on two labelled datasets that have been open-sourced:
79
- - Gabriel/cnn_daily_swe (link)
80
- - Gabriel/xsum_swe (link)
81
-
82
- To see more in depth regarding the training go to link.
83
-
84
- The core idea behind the training procedure is sequential adoption through transfer learning, i.e multiple phases for fine-tuning a pretrained model on different datasets. The figure below illustrates how the skill level of the model increases at each step:
85
-
86
-
87
- The main benefits of transfer learning in general include the saving of resources and improved efficiency when training new models, so feel free to adopt this model for your type of problem! 🤗
88
-
89
- Extractive:
90
- The extractive models for this app are using sentence-transformer models, which basically is using a bi-encoder that determines how similar two sentences are. This type of models convert texts into vectors (embedding) that capture semantic information. Additionally, LexRank, an unsupervised graph-based algorithm, is used to determine centrality scores as a post-process step to summarise. The main idea is that sentences "recommend" other similar sentences to the reader. Thus, if one sentence is very similar to many others, it will likely be a sentence of great importance. The importance of this sentence also stems from the importance of the sentences "recommending" it. Thus, to get ranked highly and placed in a summary, a sentence must be similar to many sentences that are in turn also similar to many other sentences.
91
- </p>""")
92
 
93
  with gr.Tabs():
94
  with gr.TabItem("Abstractive Generation for Summarization"):
 
71
  gr.Markdown(sum_app_text_tab_1)
72
 
73
  with gr.TabItem("The Summarization Engine"):
74
+ gr.Markdown(sum_app_text_tab_2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  with gr.Tabs():
77
  with gr.TabItem("Abstractive Generation for Summarization"):