title: How to keep the google colab running without disconnecting in 2022
body: <p>I am running my model, but the GPU keeps disconnecting after a few epochs. I googled the solution and I tried this javascript. I right-clicked then inspect the element and then go to console and paste this code.But it does not seem to work. Does anybody know any other code or ways to keep the google collab running without disconnecting</p>
  <pre><code>function ClickConnect(){
      console.log(&quot;Clicked on connect button&quot;); 
      document.querySelector(&quot;colab-connect-button&quot;).click()
  }
  
  setInterval(ClickConnect,60000)
  </code></pre>