Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
41 |
seed = random.randint(0, MAX_SEED)
|
42 |
return seed
|
43 |
|
44 |
-
@spaces.GPU(duration=30
|
45 |
def generate(
|
46 |
prompt: str,
|
47 |
negative_prompt: str = "",
|
@@ -91,9 +91,6 @@ examples = [
|
|
91 |
css = '''
|
92 |
.gradio-container{max-width: 700px !important}
|
93 |
h1{text-align:left}
|
94 |
-
footer {
|
95 |
-
visibility: hidden
|
96 |
-
}
|
97 |
'''
|
98 |
with gr.Blocks(css=css) as demo:
|
99 |
gr.Markdown(f"""# SDXL Flash
|
@@ -165,7 +162,7 @@ with gr.Blocks(css=css) as demo:
|
|
165 |
inputs=prompt,
|
166 |
outputs=[result, seed],
|
167 |
fn=generate,
|
168 |
-
cache_examples=
|
169 |
)
|
170 |
|
171 |
use_negative_prompt.change(
|
@@ -198,4 +195,4 @@ with gr.Blocks(css=css) as demo:
|
|
198 |
)
|
199 |
|
200 |
if __name__ == "__main__":
|
201 |
-
demo.
|
|
|
41 |
seed = random.randint(0, MAX_SEED)
|
42 |
return seed
|
43 |
|
44 |
+
@spaces.GPU(duration=30)
|
45 |
def generate(
|
46 |
prompt: str,
|
47 |
negative_prompt: str = "",
|
|
|
91 |
css = '''
|
92 |
.gradio-container{max-width: 700px !important}
|
93 |
h1{text-align:left}
|
|
|
|
|
|
|
94 |
'''
|
95 |
with gr.Blocks(css=css) as demo:
|
96 |
gr.Markdown(f"""# SDXL Flash
|
|
|
162 |
inputs=prompt,
|
163 |
outputs=[result, seed],
|
164 |
fn=generate,
|
165 |
+
cache_examples=True,
|
166 |
)
|
167 |
|
168 |
use_negative_prompt.change(
|
|
|
195 |
)
|
196 |
|
197 |
if __name__ == "__main__":
|
198 |
+
demo.launch()
|