Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,20 +24,20 @@ models = [
|
|
| 24 |
|
| 25 |
custom_model = "models/dreamlike-art/dreamlike-diffusion-1.0"
|
| 26 |
|
| 27 |
-
def selectModel(message):
|
| 28 |
message = message.lower()
|
| 29 |
-
|
| 30 |
-
logging.warning('model selected = '+c_model)
|
| 31 |
-
return c_model
|
| 32 |
|
| 33 |
sandbox = gr.Interface.load(
|
| 34 |
fn= selectModel,
|
| 35 |
name= custom_model,
|
| 36 |
title="""AlStable sandbox""",
|
| 37 |
-
inputs = [
|
| 38 |
-
|
| 39 |
description="""Demo for <a href="https://huggingface.co/stabilityai/stable-diffusion-2-1">AlStable</a> Stable Diffusion model.""",
|
| 40 |
article=article,
|
| 41 |
api_key=API_KEY
|
| 42 |
-
)
|
|
|
|
|
|
|
| 43 |
|
|
|
|
| 24 |
|
| 25 |
custom_model = "models/dreamlike-art/dreamlike-diffusion-1.0"
|
| 26 |
|
| 27 |
+
def selectModel(message, models):
|
| 28 |
message = message.lower()
|
| 29 |
+
return models
|
|
|
|
|
|
|
| 30 |
|
| 31 |
sandbox = gr.Interface.load(
|
| 32 |
fn= selectModel,
|
| 33 |
name= custom_model,
|
| 34 |
title="""AlStable sandbox""",
|
| 35 |
+
inputs = ["text", gr.Dropdown(models)],
|
| 36 |
+
output = "image",
|
| 37 |
description="""Demo for <a href="https://huggingface.co/stabilityai/stable-diffusion-2-1">AlStable</a> Stable Diffusion model.""",
|
| 38 |
article=article,
|
| 39 |
api_key=API_KEY
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
+
sandbox.queue(concurrency_count=20).launch()
|
| 43 |
|