Spaces:
Running
Running
Mohamed Aymane Farhi commited on
Commit ·
546d18f
1
Parent(s): cee7e4a
Initial commit.
Browse files12345678910111213141516import gradio as grfrom transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-ber")
def predict(text): return pipe(text)[0]["translation_text"]
demo = gr.Interface( fn=predict, inputs='text', outputs='text',)
demo.launch()app.pyAdded+16