import gradio as gr import torch from tqdm import tqdm from transformers import pipeline MODEL_NAME = "csebuetnlp/mT5_multilingual_XLSum" summarizer = pipeline(task="summarization", model=MODEL_NAME) def summarize(text): return summarizer(text) demo = gr.Blocks(title="⭐ Summ4rizer ⭐") demo.encrypt = False with demo: gr.Markdown(f'''