vision / transformers_app.py
Fried's picture
Add Gradio interface for translation using transformers
d7af86b
raw
history blame contribute delete
176 Bytes
from transformers import pipeline
import gradio as gr
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
demo = gr.Interface.from_pipeline(pipe)
demo.launch()