Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
def reverse_text(text): | |
pipe = pipeline('summarization', model='heisenberg3376/bart-base-summarization') | |
return pipe(text)[0]['summary_text'] | |
# Create a Gradio interface | |
interface = gr.Interface(fn=reverse_text, inputs="text", outputs="text") | |
interface.launch() |