Spaces:
Runtime error
Runtime error
feat: Enable lazy loading of examples in app.py
Browse files
app.py
CHANGED
@@ -44,11 +44,9 @@ def infer(selected_space, prompt, seed=42, randomize_seed=False, width=1024, hei
|
|
44 |
result = job.result()
|
45 |
except ValueError as e:
|
46 |
client = None
|
47 |
-
selected_space_index = (selected_space_index + 1) % len(flux_1_schell_spaces)
|
48 |
-
selected_space = flux_1_schell_spaces[selected_space_index]
|
49 |
raise gr.Error(e)
|
50 |
|
51 |
-
return
|
52 |
|
53 |
examples = [
|
54 |
"a tiny astronaut hatching from an egg on the moon",
|
@@ -141,7 +139,7 @@ with gr.Blocks(css=css) as demo:
|
|
141 |
triggers=[run_button.click, prompt.submit],
|
142 |
fn = infer,
|
143 |
inputs = [space, prompt, seed, randomize_seed, width, height, num_inference_steps],
|
144 |
-
outputs = [
|
145 |
)
|
146 |
|
147 |
demo.launch()
|
|
|
44 |
result = job.result()
|
45 |
except ValueError as e:
|
46 |
client = None
|
|
|
|
|
47 |
raise gr.Error(e)
|
48 |
|
49 |
+
return result
|
50 |
|
51 |
examples = [
|
52 |
"a tiny astronaut hatching from an egg on the moon",
|
|
|
139 |
triggers=[run_button.click, prompt.submit],
|
140 |
fn = infer,
|
141 |
inputs = [space, prompt, seed, randomize_seed, width, height, num_inference_steps],
|
142 |
+
outputs = [result, seed]
|
143 |
)
|
144 |
|
145 |
demo.launch()
|