File size: 949 Bytes
fbf1592 47fb169 fbf1592 cd127bf 47fb169 fbf1592 47fb169 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
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() |