Spaces:
Sleeping
Sleeping
File size: 360 Bytes
f17eb5d 3ae2dd1 f47dd3c f17eb5d 3ae2dd1 f17eb5d 3ae2dd1 545795d f17eb5d f47dd3c f17eb5d |
1 2 3 4 5 6 7 8 9 10 11 12 |
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() |