File size: 852 Bytes
e6d0f4c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr
from summarizer import summarize


with open("Example/File.txt", 'r',  encoding="utf8") as f:
    text = f.read()

sample = [text]

interface = gr.Interface(fn = summarize,
                        inputs = [gr.inputs.Textbox(lines=5,
                                                    placeholder="Enter your text...",
                                                    label='News Input'),
                                  gr.inputs.Radio(["T5", "BART"], type="value", label='Model')
                                  ],
                          
                        outputs = [gr.outputs.Textbox(
                                                      label="Sar")],
                         
                        title = "Hindi News Summarizer",
                        examples=[sample])

interface.launch(debug=True)