diff --git a/gamestonk_terminal/cryptocurrency/crypto_controller.py b/gamestonk_terminal/cryptocurrency/crypto_controller.py index 60bb92bfa3c..4f3abdf1fd4 100644 --- a/gamestonk_terminal/cryptocurrency/crypto_controller.py +++ b/gamestonk_terminal/cryptocurrency/crypto_controller.py @@ -437,28 +437,34 @@ class CryptoController(CryptoBaseController): @log_start_end(log=logger) def call_pred(self, _): """Process pred command""" - if self.coin: - try: - from gamestonk_terminal.cryptocurrency.prediction_techniques import ( - pred_controller, - ) - - if self.current_interval != "1day": - console.print("Only interval `1day` is possible for now.\n") - else: - self.queue = self.load_class( - pred_controller.PredictionTechniquesController, - self.coin, - self.current_df, - self.queue, + if gtff.ENABLE_PREDICT: + if self.coin: + try: + from gamestonk_terminal.cryptocurrency.prediction_techniques import ( + pred_controller, ) - except ImportError: - logger.exception("Tensorflow not available") - console.print("[red]Run pip install tensorflow to continue[/red]\n") + if self.current_interval != "1day": + console.print("Only interval `1day` is possible for now.\n") + else: + self.queue = self.load_class( + pred_controller.PredictionTechniquesController, + self.coin, + self.current_df, + self.queue, + ) + except ImportError: + logger.exception("Tensorflow not available") + console.print("[red]Run pip install tensorflow to continue[/red]\n") + + else: + console.print( + "No coin selected. Use 'load' to load the coin you want to look at.\n" + ) else: console.print( - "No coin selected. Use 'load' to load the coin you want to look at.\n" + "Predict is disabled. Check ENABLE_PREDICT flag on feature_flags.py", + "\n", ) @log_start_end(log=logger)