Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,6 @@ import os
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
API_KEY=os.environ.get('HUGGING_FACE_HUB_TOKEN', None)
|
| 5 |
-
|
| 6 |
article = """---
|
| 7 |
This space was created using [SD Space Creator](https://huggingface.co/spaces/anzorq/sd-space-creator)."""
|
| 8 |
|
|
@@ -19,7 +18,7 @@ AssertionError: parameter: src must be one of dict_keys(['huggingface', 'models'
|
|
| 19 |
"""
|
| 20 |
models = [
|
| 21 |
Model("Marvel","models/ItsJayQz/Marvel_WhatIf_Diffusion", "whatif style"),
|
| 22 |
-
Model("Cyberpunk Anime Diffusion", "models/DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style
|
| 23 |
Model("Guan Yu Diffusion", "models/DGSpitzer/Guan-Yu-Diffusion", "Guan-Yu"),
|
| 24 |
Model("Portrait plus", "models/wavymulder/portraitplus", "portrait+ style"),
|
| 25 |
Model("classic Disney", "models/nitrosocke/classic-anim-diffusion", "classic disney style"),
|
|
@@ -28,10 +27,12 @@ models = [
|
|
| 28 |
|
| 29 |
custom_model = models[1].path
|
| 30 |
|
| 31 |
-
gr.Interface.load(
|
| 32 |
name= custom_model,
|
| 33 |
title="""AlStable sandbox""",
|
|
|
|
| 34 |
description="""Demo for <a href="https://huggingface.co/stabilityai/stable-diffusion-2-1">AlStable</a> Stable Diffusion model.""",
|
| 35 |
article=article,
|
| 36 |
api_key=API_KEY,
|
| 37 |
-
|
|
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
API_KEY=os.environ.get('HUGGING_FACE_HUB_TOKEN', None)
|
|
|
|
| 5 |
article = """---
|
| 6 |
This space was created using [SD Space Creator](https://huggingface.co/spaces/anzorq/sd-space-creator)."""
|
| 7 |
|
|
|
|
| 18 |
"""
|
| 19 |
models = [
|
| 20 |
Model("Marvel","models/ItsJayQz/Marvel_WhatIf_Diffusion", "whatif style"),
|
| 21 |
+
Model("Cyberpunk Anime Diffusion", "models/DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style"),
|
| 22 |
Model("Guan Yu Diffusion", "models/DGSpitzer/Guan-Yu-Diffusion", "Guan-Yu"),
|
| 23 |
Model("Portrait plus", "models/wavymulder/portraitplus", "portrait+ style"),
|
| 24 |
Model("classic Disney", "models/nitrosocke/classic-anim-diffusion", "classic disney style"),
|
|
|
|
| 27 |
|
| 28 |
custom_model = models[1].path
|
| 29 |
|
| 30 |
+
sandbox = gr.Interface.load(
|
| 31 |
name= custom_model,
|
| 32 |
title="""AlStable sandbox""",
|
| 33 |
+
inputs=gr.Textbox(lines=2, placeholder="prompt Here..."),
|
| 34 |
description="""Demo for <a href="https://huggingface.co/stabilityai/stable-diffusion-2-1">AlStable</a> Stable Diffusion model.""",
|
| 35 |
article=article,
|
| 36 |
api_key=API_KEY,
|
| 37 |
+
)
|
| 38 |
+
sandbox.queue(concurrency_count=20).launch()
|