import gradio as gr from transformers import pipeline summarizer = pipeline("summarization", model="facebook/bart-large-cnn") def summarize(text, slen): return summarizer(text, max_length=slen, min_length=50)[0]["summary_text"] title = "Bart large CNN Summarizer" description = "Abstractive Text Summarization using Hugging Face transformers." article = "

Sources: Transformers: Machine Learning with pretrained models

With help of Currency Strength meter: live indicator with real-time market data that compares a currency with other major currencies

" gr.Interface( fn=summarize, inputs=[ gr.inputs.Textbox(label="Input Text", lines=12, placeholder="Enter text to summarize here"), gr.inputs.Slider(60, 1000, default=400, label="Max summary length") ], outputs=gr.outputs.Textbox(type="text", label="Summary"), title=title, description=description, article=article, ).launch()