Skip to content

Commit

Permalink
Fixed google colab check
Browse files Browse the repository at this point in the history
google colab changed some things and the check for testing if the notebook was running in colab would fail

Move the running_in_colab into the try catch block
  • Loading branch information
mohseninima authored and dechamps committed Jan 1, 2023
1 parent 08345d9 commit 236685d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Loudspeaker_Explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ import pathlib
import re
import textwrap

running_in_colab = 'COLAB_GPU' in os.environ
try:
import google.colab
running_in_colab = True
except:
running_in_colab = False

if LOUDSPEAKER_EXPLORER_PRERENDERED_GIT_SHA is not None and running_in_colab:
def read_git_sha(directory):
Expand Down

0 comments on commit 236685d

Please sign in to comment.