Spaces:
Runtime error
Runtime error
| 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).""" | |
| import gradio as gr | |
| article = """---This space was created using [SD Space Creator](https://huggingface.co/spaces/anzorq/sd-space-creator).""" | |
| MODLS=[ | |
| "models/ItsJayQz/Marvel_WhatIf_Diffusion", | |
| "models/DGSpitzer/Cyberpunk-Anime-Diffusion", | |
| "models/DGSpitzer/Guan-Yu-Diffusion", | |
| "models/wavymulder/portraitplus", | |
| "models/nitrosocke/classic-anim-diffusion", | |
| "models/22h/vintedois-diffusion-v0-1", | |
| "models/dreamlike-art/dreamlike-diffusion-1.0", | |
| "models/stabilityai/stable-diffusion-2-1" | |
| ] | |
| TXT="AlStable Demo" | |
| def prediction(input_choice): | |
| return gr.Image(input_choice) | |
| def prediction(model_choice, input): | |
| modl = MODLS[model_choice] | |
| return modl | |
| sandbox = gr.Interface( | |
| fn=prediction, | |
| inputs=gr.inputs.Dropdown(MODLS), | |
| outputs=gr.Image(), | |
| title=TXT, | |
| description=TXT, | |
| article=article, | |
| api_key=API_KEY | |
| ) | |
| sandbox.queue(concurrency_count=20).launch() | |