Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
models = [
|
| 4 |
"models/stabilityai/stable-diffusion-xl-base-0.9",
|
|
@@ -19,4 +20,7 @@ models = [
|
|
| 19 |
def choose_model(model_name):
|
| 20 |
gr.Interface.load(model_name).launch()
|
| 21 |
|
| 22 |
-
model_dropdown =
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from gradio import components
|
| 3 |
|
| 4 |
models = [
|
| 5 |
"models/stabilityai/stable-diffusion-xl-base-0.9",
|
|
|
|
| 20 |
def choose_model(model_name):
|
| 21 |
gr.Interface.load(model_name).launch()
|
| 22 |
|
| 23 |
+
model_dropdown = components.Dropdown(models)
|
| 24 |
+
interface = gr.Interface(fn=choose_model, inputs=model_dropdown, outputs=None)
|
| 25 |
+
interface.launch()
|
| 26 |
+
|