import gradio as gr gpt2 = gr.load( "huggingface/gpt2", title="Write with GPT2", description="Generate texts with GPT2. 🤖📄", examples=[ "Quantum computing is a", "The biggest planet in our solar system is", "I have a pet cat named Kitty." ] ) sd = gr.load( "models/stabilityai/stable-diffusion-2", title="Generate Images with Stable Diffusion", description="Generate images using Stable Diffusion 2.1 🤖🎨", examples=[ "Colorful painting of flowers, digital art", "3D render of a sphere, trending on Artstation" ] ) chat = gr.load( "models/microsoft/DialoGPT-medium", title="Chat with DialoGPT", description="Chat with DialoGPT. 🤖💬" ) iface = gr.TabbedInterface( [gpt2, sd, chat], ["GPT2", "Stable Diffusion", "DialoGPT"], theme="soft", title="IloveAI", ) if __name__ == "__main__": iface.queue() iface.launch()