Spaces:
Sleeping
Sleeping
File size: 332 Bytes
fbe6c64 9ea6adf fbe6c64 9ea6adf e98b406 fbe6c64 9ea6adf fbe6c64 9ea6adf |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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() |