Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,11 @@ model_functions = {}
|
|
17 |
model_idx = 1
|
18 |
for model_path in models:
|
19 |
try:
|
20 |
-
model_functions[model_idx] = gr.Interface.load(f"models/{model_path}"
|
21 |
except Exception as error:
|
22 |
def the_fn(txt):
|
23 |
return None
|
24 |
-
model_functions[model_idx] = gr.Interface(fn=the_fn, inputs=gr.
|
25 |
model_idx += 1
|
26 |
|
27 |
def send_it_idx(idx):
|
@@ -59,7 +59,7 @@ with gr.Interface(title="SD Models") as my_interface:
|
|
59 |
with gr.Column():
|
60 |
with gr.Row():
|
61 |
with gr.Column():
|
62 |
-
primary_prompt = gr.
|
63 |
with gr.Column():
|
64 |
run = gr.Button("Run")
|
65 |
clear_btn = gr.Button("Clear")
|
@@ -68,12 +68,12 @@ with gr.Interface(title="SD Models") as my_interface:
|
|
68 |
model_idx = 1
|
69 |
for model_path in models:
|
70 |
with gr.Column():
|
71 |
-
sd_outputs[model_idx] = gr.
|
72 |
model_idx += 1
|
73 |
|
74 |
-
start_box = gr.
|
75 |
-
end_box = gr.
|
76 |
-
tog_box = gr.
|
77 |
|
78 |
def on_change_start_box(value):
|
79 |
return all_task_end(value, end_box.value)
|
|
|
17 |
model_idx = 1
|
18 |
for model_path in models:
|
19 |
try:
|
20 |
+
model_functions[model_idx] = gr.Interface.load(f"models/{model_path}")
|
21 |
except Exception as error:
|
22 |
def the_fn(txt):
|
23 |
return None
|
24 |
+
model_functions[model_idx] = gr.Interface(fn=the_fn, inputs=gr.Textbox(), outputs=gr.Image())
|
25 |
model_idx += 1
|
26 |
|
27 |
def send_it_idx(idx):
|
|
|
59 |
with gr.Column():
|
60 |
with gr.Row():
|
61 |
with gr.Column():
|
62 |
+
primary_prompt = gr.Textbox(label="Prompt", default="")
|
63 |
with gr.Column():
|
64 |
run = gr.Button("Run")
|
65 |
clear_btn = gr.Button("Clear")
|
|
|
68 |
model_idx = 1
|
69 |
for model_path in models:
|
70 |
with gr.Column():
|
71 |
+
sd_outputs[model_idx] = gr.Image(label=model_path)
|
72 |
model_idx += 1
|
73 |
|
74 |
+
start_box = gr.Number(visible=False)
|
75 |
+
end_box = gr.Number(visible=False)
|
76 |
+
tog_box = gr.Textbox(default=0, visible=False)
|
77 |
|
78 |
def on_change_start_box(value):
|
79 |
return all_task_end(value, end_box.value)
|