TranslateApp / app.py
GiladtheFixer's picture
Create app.py
ede7c54
raw
history blame contribute delete
266 Bytes
import gradio as gr
from transformers import pipeline
def predict(text,name):
pipe = pipeline("translation", model=name)
return pipe(text)[0]["translation_text"]
demo = gr.Interface(
fn=predict,
inputs=['text','text'],
outputs='text',
)
demo.launch()