## suppress warnings from transformers.utils import logging logging.set_verbosity_error() import warnings warnings.filterwarnings("ignore") from transformers import pipeline pipe = pipeline(task = "summarization", model = "Falconsai/text_summarization") def summarize(input_text) : op = pipe(input_text) return op[0]['summary_text'] import gradio as gr iface = gr.Interface(fn = summarize, inputs = "text", outputs = "text") iface.launch(share = True)