ghostsInTheMachine commited on
Commit
7d37659
·
verified ·
1 Parent(s): 76c981d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -173,18 +173,15 @@ with gr.Blocks(css=custom_css, theme=WhiteTheme()) as demo:
173
  btn.click(fn=remove_background_wrapper, inputs=image_input, outputs=[
174
  output_foreground, output_background, output_foreground_mask, output_background_mask])
175
 
176
- # Force light theme
177
- demo.load(
178
- None,
179
- None,
180
- _js="""
181
  () => {
182
  const params = new URLSearchParams(window.location.search);
183
  if (!params.has('__theme')) {
184
  params.set('__theme', 'light');
185
  window.location.search = params.toString();
186
  }
187
- }"""
188
- )
189
 
190
  demo.launch(debug=True)
 
173
  btn.click(fn=remove_background_wrapper, inputs=image_input, outputs=[
174
  output_foreground, output_background, output_foreground_mask, output_background_mask])
175
 
176
+ # Force light theme using the correct JavaScript loading syntax
177
+ demo.load(js="""
 
 
 
178
  () => {
179
  const params = new URLSearchParams(window.location.search);
180
  if (!params.has('__theme')) {
181
  params.set('__theme', 'light');
182
  window.location.search = params.toString();
183
  }
184
+ }
185
+ """)
186
 
187
  demo.launch(debug=True)