Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
import gradio as gr | |
model = pipeline("summarization", model="gsasikiran/bart-base-finetuned-cnn", tokenizer="facebook/bart-base") | |
title = "Article Title Generator" | |
description = "Generates titles for articles based on the input text." | |
article = "The quick brown fox jumps over the lazy dog." | |
hf = gr.Interface( | |
fn=model, | |
inputs=gr.Textbox(lines=5, label="Input Text"), | |
title=title, | |
description=description, | |
article=article, | |
outputs = gr.Textbox(lines=2, label="Title") | |
) | |
hf.launch() |