import gradio as gr from src.TextSummarizer.pipeline.prediction import PredictionPipeline def predict(document): """ Method will take the document and summarize it. """ # predict the summary using my own pre-trained model. summary = PredictionPipeline().predict(document) return summary # Create the frontend. input_interfaces: list = [] with gr.Blocks(theme=gr.theme.Soft()) as app: with gr.Row(): title = "Text Summarizer..." app.launch()