Skip to content

Instantly share code, notes, and snippets.

View sajauguida7678982eguhguw78t376r6736734f's full-sized avatar

sajauguida7678982eguhguw78t376r6736734f

View GitHub Profile
@sajauguida7678982eguhguw78t376r6736734f
sajauguida7678982eguhguw78t376r6736734f / avoid_colab_close.js
Created February 11, 2022 16:36 — forked from amrrs/avoid_colab_close.js
How to avoid Google Colab Session Closing automatically?
//credit - https://huggingface.co/blog/fine-tune-wav2vec2-english (Patrick von Platen)
// run this on your Chrome / Browser Console (where Colab is present)
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
var colab = setInterval(ConnectButton,60000);