Spaces:
Running
on
Zero
Running
on
Zero
Fix
Browse files
app.py
CHANGED
@@ -63,6 +63,10 @@ def infer(
|
|
63 |
return image, seed
|
64 |
|
65 |
|
|
|
|
|
|
|
|
|
66 |
examples = [
|
67 |
"a tiny astronaut hatching from an egg on the moon",
|
68 |
"a cat holding a sign that says hello world",
|
@@ -139,11 +143,9 @@ with gr.Blocks(css=css) as demo:
|
|
139 |
|
140 |
gr.Examples(
|
141 |
examples=examples,
|
142 |
-
fn=
|
143 |
inputs=prompt,
|
144 |
outputs=[result, seed],
|
145 |
-
cache_examples=True,
|
146 |
-
cache_mode="lazy",
|
147 |
)
|
148 |
|
149 |
prompt.submit(
|
|
|
63 |
return image, seed
|
64 |
|
65 |
|
66 |
+
def run_example(prompt: str) -> tuple[PIL.Image.Image, int]:
|
67 |
+
return infer(prompt, seed=42, randomize_seed=False)
|
68 |
+
|
69 |
+
|
70 |
examples = [
|
71 |
"a tiny astronaut hatching from an egg on the moon",
|
72 |
"a cat holding a sign that says hello world",
|
|
|
143 |
|
144 |
gr.Examples(
|
145 |
examples=examples,
|
146 |
+
fn=run_example,
|
147 |
inputs=prompt,
|
148 |
outputs=[result, seed],
|
|
|
|
|
149 |
)
|
150 |
|
151 |
prompt.submit(
|