atatakun commited on
Commit
3547236
·
verified ·
1 Parent(s): 58aef59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -267,7 +267,16 @@ with block:
267
  with gr.Column():
268
  gallery = gr.Gallery(label="Generated images", show_label=False, height="auto")
269
  # gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
270
-
 
 
 
 
 
 
 
 
 
271
  run_button.click(fn=canny, inputs=[input_image, resolution, low_threshold, high_threshold], outputs=[gallery])
272
 
273
  gr.Markdown("<hr>")
 
267
  with gr.Column():
268
  gallery = gr.Gallery(label="Generated images", show_label=False, height="auto")
269
  # gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
270
+ dropdown.change(None, dropdown, None, _js=js)
271
+ toggle_dark.click(
272
+ None,
273
+ _js="""
274
+ () => {
275
+ document.body.classList.toggle('dark');
276
+ document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'
277
+ }
278
+ """,
279
+ )
280
  run_button.click(fn=canny, inputs=[input_image, resolution, low_threshold, high_threshold], outputs=[gallery])
281
 
282
  gr.Markdown("<hr>")