From bea3c36644d0a7d1f8bac0c0880c0ea19239d5f6 Mon Sep 17 00:00:00 2001 From: Cedric Spindler Date: Mon, 4 Dec 2023 13:47:53 +0100 Subject: [PATCH] Update imports to work with gunicorn --- batdetect2_gui/application.py | 4 ++-- batdetect2_gui/audio_utils.py | 2 +- batdetect2_gui/generate_data.py | 4 ++-- batdetect2_gui/prepare_audio_files.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/batdetect2_gui/application.py b/batdetect2_gui/application.py index d058c41..0f551e7 100755 --- a/batdetect2_gui/application.py +++ b/batdetect2_gui/application.py @@ -20,8 +20,8 @@ session, ) -from batdetect2_gui import config -from batdetect2_gui import generate_data as gd +import config +import generate_data as gd application = Flask(__name__) application.secret_key = config.SECRET_KEY diff --git a/batdetect2_gui/audio_utils.py b/batdetect2_gui/audio_utils.py index 3a02cbd..d10b3a3 100755 --- a/batdetect2_gui/audio_utils.py +++ b/batdetect2_gui/audio_utils.py @@ -3,7 +3,7 @@ import numpy as np from PIL import Image -from batdetect2_gui import wavfile +import wavfile def generate_spectrogram(audio, sampling_rate, params): diff --git a/batdetect2_gui/generate_data.py b/batdetect2_gui/generate_data.py index ba278ef..0768816 100644 --- a/batdetect2_gui/generate_data.py +++ b/batdetect2_gui/generate_data.py @@ -6,8 +6,8 @@ import numpy as np from PIL import Image -from batdetect2_gui import audio_utils as au -from batdetect2_gui import wavfile +import audio_utils as au +import wavfile def compute_audio_data(annotation, audio_dir, playback_time_expansion): diff --git a/batdetect2_gui/prepare_audio_files.py b/batdetect2_gui/prepare_audio_files.py index 892815d..ad00545 100644 --- a/batdetect2_gui/prepare_audio_files.py +++ b/batdetect2_gui/prepare_audio_files.py @@ -13,8 +13,8 @@ import numpy as np -from batdetect2_gui import audio_utils as au -from batdetect2_gui import wavfile +import audio_utils as au +import wavfile def parse_args():