Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| titulo="Texto a Imagen con Stable Diffusion 2.0" | |
| descripcion = '<h2 style="text-align:center">Prompt en Español!</h2>' | |
| 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 = '<h2 style="text-align:center">Prompt in English!</h2>' | |
| 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() |