AlPrompt / app.py
AlStable's picture
Update app.py
0d7c941
raw
history blame
1.05 kB
import os
import gradio as gr
API_KEY=os.environ.get('HUGGING_FACE_HUB_TOKEN', None)
article = """---
This space was created using [SD Space Creator](https://huggingface.co/spaces/anzorq/sd-space-creator)."""
class Model:
def __init__(self, name, path="", prefix=""):
self.name = name
self.path = path
self.prefix = prefix
self.pipe_t2i = None
self.pipe_i2i = None
models = [
Model("Marvel","ItsJayQz/Marvel_WhatIf_Diffusion", "Marvel")
Model("Cyberpunk Anime Diffusion", "DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style "),
Model("Guan Yu Diffusion", "DGSpitzer/Guan-Yu-Diffusion", "Guan-Yu")
]
custom_model = "models/stabilityai/stable-diffusion-2-1"
gr.Interface.load(
name= custom_model,
title="""Stable Diffusion 2 1 sandbox""",
description="""Demo for <a href="https://huggingface.co/stabilityai/stable-diffusion-2-1">Stable Diffusion 2 1</a> Stable Diffusion model.""",
article=article,
api_key=API_KEY,
).queue(concurrency_count=20).launch()