iloveai / app.py
miittnnss's picture
Update app.py
cd127bf
raw
history blame contribute delete
No virus
949 Bytes
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()