import gradio as gr titulo="Texto a Imagen con Stable Diffusion 2.0" descripcion = '

Prompt en Español!

' articulo = """ El modelo usa: - Texto a Imagen [Stable Diffusion 2.0](https://huggingface.co/stabilityai/stable-diffusion-2), - Para las traducciones [Helsinki-NLP](https://huggingface.co/Helsinki-NLP) \n ... y mucha magia ☺ """ text_imagen = gr.Interface.load("models/stabilityai/stable-diffusion-2") text_translate = gr.Interface.load("models/Helsinki-NLP/opus-mt-es-en") es_demo = gr.Series(text_translate, text_imagen, title=titulo, description = descripcion, article=articulo) title = 'Text to Image with Stable difussion 2.0' description = '

Prompt in English!

' article = """ The model use: - text to Image [Stable Diffusion 2.0](https://huggingface.co/stabilityai/stable-diffusion-2), \n ... and so magic ☺ """ en_demo = gr.Interface.load("models/stabilityai/stable-diffusion-2", title=title, description=description, article=article) demo = gr.TabbedInterface([en_demo, es_demo], ["Text-Image English", "Texto-Imagen Español"]) if __name__ == "__main__": demo.launch()