Skip to content

Commit

Permalink
Increase the reload timeout a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Mar 16, 2023
1 parent 4d64a57 commit 599d313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def set_interface_mode(mode, choices):
group = gr.CheckboxGroup(choices=extensions, value=shared.args.extensions, label="Available extensions")
kill = gr.Button("Apply and restart the interface")
kill.click(set_interface_mode, [modes_menu, group], None)
kill.click(lambda : None, None, None, _js='() => {document.body.innerHTML=\'<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>\'; setTimeout(function(){location.reload()},2000)}')
kill.click(lambda : None, None, None, _js='() => {document.body.innerHTML=\'<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>\'; setTimeout(function(){location.reload()},2500)}')

if shared.args.extensions is not None:
extensions_module.create_extensions_block()
Expand Down

0 comments on commit 599d313

Please sign in to comment.