import gradio as gr #def greet(name): # return "Hello " + name + "!!" #iface = gr.Interface(fn=greet, inputs="text", outputs="text") #iface.launch() from transformers import pipeline pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es") demo = gr.Interface.from_pipeline(pipe) demo.launch() #demo = gr.load("Helsinki-NLP/opus-mt-en-es", src="models") #demo.launch()