File size: 865 Bytes
9b3f284
38d3497
9b3f284
085bcdc
 
 
 
 
 
 
38d3497
 
1bd2519
38d3497
085bcdc
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
from Summarizer.Extractive import summarize

description = """
<center>
LegSum is a tool to summarize legal proceedings such as judgment, bills using classical and SOTA models
</center>
"""
article="<p style='text-align: center'> Created by Pawan Trivedi 2022 | <a href='https://github.com/d0r1h/'>GitHub</a></p>"

interface = gr.Interface(fn = summarize,
                        inputs = [gr.inputs.File(),
                                  gr.inputs.Radio(['Pegasus', 'Distill' , 'LEDBill', 'ILC', 'BERT', 'Lsa', 'SumBasic', 'TextRank'], type="value", label='Model')],
                        outputs = "text",
                        title = "LegSum",
                        description=description,
                        article = article)

interface.launch(debug=True, 
                 enable_queue=True)