Spaces:
Build error
Build error
| import gradio as gr | |
| from transformers import pipeline | |
| # Load the Stable Diffusion TTS model | |
| tts_demo = gr.Interface.load( | |
| "models/runwayml/stable-diffusion-v1-5", | |
| title=None, | |
| description="Give me something to paint!" | |
| ) | |
| # Load the text-to-image prompt generator model | |
| stt_demo = gr.Interface.load( | |
| "models/succinctly/text2image-prompt-generator", | |
| title=None, | |
| description="Let me try to guess what you're saying!" | |
| ) | |
| # Load the image classification model | |
| image_classification = pipeline("image-classification") | |
| # Create the tabbed interface | |
| demo = gr.TabbedInterface([tts_demo, stt_demo, gr.Interface.from_pipeline(image_classification)], ["Paint", "Text", "Image"]) | |
| # Launch the interface | |
| demo.launch() | |