| 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) |