From 50cafba12ff719f3afdc7e08ea0578881c49aa70 Mon Sep 17 00:00:00 2001 From: erew123 <35898566+erew123@users.noreply.github.com> Date: Mon, 25 Nov 2024 00:33:37 +0000 Subject: [PATCH] Google colab detection fix --- script.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script.py b/script.py index 8136181..df3e5d1 100644 --- a/script.py +++ b/script.py @@ -720,11 +720,11 @@ def check_google_colab(): """ debug_func_entry() try: - from google.colab import colab + import google.colab return True except ImportError: return False - + _state['running_on_google_colab'] = check_google_colab() ############################################################################### @@ -947,7 +947,6 @@ def signal_handler(sig, frame): # pylint: disable=unused-argument ##################################################################### # pylint: disable=ungrouped-imports,unused-import,import-outside-toplevel,import-error if check_google_colab(): - _state['running_on_google_colab'] = True try: with open("/content/alltalk_tts/googlecolab.json", "r", encoding="utf-8") as f: data = json.load(f)