ShynBui's picture
add example
f47dd3c
raw
history blame
360 Bytes
import gradio as gr
import spaces
from transformers import pipeline
import os
pipe = pipeline("summarization", model="ShynBui/Bartpho_spelling_correction")
def greet(text):
return pipe(text, max_new_tokens= 512)[0]['summary_text']
demo = gr.Interface(fn=greet, inputs=gr.Text(), outputs=gr.Text(), examples=eval(os.environ['DES_EXAMPLE']))
demo.launch()