Viewing a single comment thread. View all comments

ckperry t1_j8ygjep wrote

[edit] I give up on formatting

We've never really worked on a foilproof way to detect if you're using Colab, but this might work a little better for you:

import sys probably_colab = False

if 'google.colab' in sys.modules: probably_colab = True

11

Captain_Cowboy t1_j8z1lv4 wrote

Maybe a little easier:

import sys
probably_colab = 'google.colab' in sys.modules
12