amankishore commited on
Commit
f5a1495
·
1 Parent(s): 2f1e32c

Update Check Device

Browse files
Files changed (1) hide show
  1. app.py +14 -13
app.py CHANGED
@@ -116,20 +116,21 @@ with block:
116
  with gr.Column():
117
  gallery = gr.Gallery(label="Generated images", show_label=False).style(
118
  grid=[2], height="auto")
119
- gr.Examples(
120
- examples=[
121
- ["./examples/original_iso.png", "hogwarts castle",
122
- "", 50, 4, 10.0, 123123123, 0.8],
123
- ["./examples/original_sword.png", "flaming sword",
124
- "", 50, 4, 9.0, 1734133747, 0.8],
 
125
 
126
- ],
127
- inputs=[input_image, prompt, negative_prompt, steps,
128
- num_samples, scale, seed, strength],
129
- outputs=[gallery],
130
- fn=predict,
131
- cache_examples=True,
132
- )
133
  run_button.click(fn=predict, inputs=[input_image, prompt, negative_prompt,
134
  steps, num_samples, scale, seed, strength], outputs=[gallery])
135
 
 
116
  with gr.Column():
117
  gallery = gr.Gallery(label="Generated images", show_label=False).style(
118
  grid=[2], height="auto")
119
+ if device == "cuda":
120
+ gr.Examples(
121
+ examples=[
122
+ ["./examples/original_iso.png", "hogwarts castle",
123
+ "", 50, 4, 10.0, 123123123, 0.8],
124
+ ["./examples/original_sword.png", "flaming sword",
125
+ "", 50, 4, 9.0, 1734133747, 0.8],
126
 
127
+ ],
128
+ inputs=[input_image, prompt, negative_prompt, steps,
129
+ num_samples, scale, seed, strength],
130
+ outputs=[gallery],
131
+ fn=predict,
132
+ cache_examples=True,
133
+ )
134
  run_button.click(fn=predict, inputs=[input_image, prompt, negative_prompt,
135
  steps, num_samples, scale, seed, strength], outputs=[gallery])
136