Google colab detection fix
This commit is contained in:
1 parent
3d3047fb93
commit
50cafba12f
1 file changed
+2
-3
@@ -720,11 +720,11 @@ def check_google_colab():
|
|||||||
"""
|
"""
|
||||||
debug_func_entry()
|
debug_func_entry()
|
||||||
try:
|
try:
|
||||||
from google.colab import colab
|
import google.colab
|
||||||
return True
|
return True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
_state['running_on_google_colab'] = check_google_colab()
|
_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
|
# pylint: disable=ungrouped-imports,unused-import,import-outside-toplevel,import-error
|
||||||
if check_google_colab():
|
if check_google_colab():
|
||||||
_state['running_on_google_colab'] = True
|
|
||||||
try:
|
try:
|
||||||
with open("/content/alltalk_tts/googlecolab.json", "r", encoding="utf-8") as f:
|
with open("/content/alltalk_tts/googlecolab.json", "r", encoding="utf-8") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|||||||
Reference in new issue
Block a user