GiladtheFixer's picture
Update app.py
8f6a211
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()