Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -173,4 +173,18 @@ 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 |
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
|
| 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)
|