Spaces:
Running
on
Zero
Running
on
Zero
clementchadebec
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def process_input(input_image, upscale_factor, **kwargs):
|
|
81 |
return input_image.resize((w, h)), w_original, h_original, was_resized
|
82 |
|
83 |
|
84 |
-
@spaces.GPU(duration=
|
85 |
def infer(
|
86 |
seed,
|
87 |
randomize_seed,
|
@@ -184,11 +184,11 @@ with gr.Blocks(css=css) as demo:
|
|
184 |
examples = gr.Examples(
|
185 |
examples=[
|
186 |
[42, False, "examples/image_1.jpg", 28, 4, 0.6],
|
187 |
-
|
188 |
[42, False, "examples/image_3.jpg", 28, 4, 0.6],
|
189 |
[42, False, "examples/image_4.jpg", 28, 4, 0.6],
|
190 |
-
|
191 |
-
|
192 |
],
|
193 |
inputs=[
|
194 |
seed,
|
@@ -200,28 +200,28 @@ with gr.Blocks(css=css) as demo:
|
|
200 |
],
|
201 |
fn=infer,
|
202 |
outputs=result,
|
203 |
-
cache_examples=
|
204 |
)
|
205 |
|
206 |
-
examples = gr.Examples(
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
)
|
225 |
|
226 |
gr.Markdown("**Disclaimer:**")
|
227 |
gr.Markdown(
|
|
|
81 |
return input_image.resize((w, h)), w_original, h_original, was_resized
|
82 |
|
83 |
|
84 |
+
@spaces.GPU(duration=42)
|
85 |
def infer(
|
86 |
seed,
|
87 |
randomize_seed,
|
|
|
184 |
examples = gr.Examples(
|
185 |
examples=[
|
186 |
[42, False, "examples/image_1.jpg", 28, 4, 0.6],
|
187 |
+
[42, False, "examples/image_2.jpg", 28, 4, 0.6],
|
188 |
[42, False, "examples/image_3.jpg", 28, 4, 0.6],
|
189 |
[42, False, "examples/image_4.jpg", 28, 4, 0.6],
|
190 |
+
[42, False, "examples/image_5.jpg", 28, 4, 0.6],
|
191 |
+
[42, False, "examples/image_6.jpg", 28, 4, 0.6],
|
192 |
],
|
193 |
inputs=[
|
194 |
seed,
|
|
|
200 |
],
|
201 |
fn=infer,
|
202 |
outputs=result,
|
203 |
+
cache_examples="lazy",
|
204 |
)
|
205 |
|
206 |
+
# examples = gr.Examples(
|
207 |
+
# examples=[
|
208 |
+
# #[42, False, "examples/image_1.jpg", 28, 4, 0.6],
|
209 |
+
# [42, False, "examples/image_2.jpg", 28, 4, 0.6],
|
210 |
+
# #[42, False, "examples/image_3.jpg", 28, 4, 0.6],
|
211 |
+
# #[42, False, "examples/image_4.jpg", 28, 4, 0.6],
|
212 |
+
# [42, False, "examples/image_5.jpg", 28, 4, 0.6],
|
213 |
+
# [42, False, "examples/image_6.jpg", 28, 4, 0.6],
|
214 |
+
# [42, False, "examples/image_7.jpg", 28, 4, 0.6],
|
215 |
+
# ],
|
216 |
+
# inputs=[
|
217 |
+
# seed,
|
218 |
+
# randomize_seed,
|
219 |
+
# input_im,
|
220 |
+
# num_inference_steps,
|
221 |
+
# upscale_factor,
|
222 |
+
# controlnet_conditioning_scale,
|
223 |
+
# ],
|
224 |
+
# )
|
225 |
|
226 |
gr.Markdown("**Disclaimer:**")
|
227 |
gr.Markdown(
|