From bf6abaee66ebf7f8a25b6808a82eb0f6aa02ceeb Mon Sep 17 00:00:00 2001 From: Kostis-S-Z Date: Wed, 27 Nov 2024 16:07:05 +0200 Subject: [PATCH] Fix package imports --- src/opennotebookllm/inference/text_to_speech.py | 4 ++-- src/opennotebookllm/podcast_maker/script_to_audio.py | 4 ++-- tests/conftest.py | 2 +- tests/integration/test_text_to_text_to_speech.py | 10 +++++----- tests/unit/inference/test_model_loaders.py | 2 +- tests/unit/inference/test_text_to_speech.py | 6 +++--- tests/unit/podcast_maker/test_script_to_audio.py | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/opennotebookllm/inference/text_to_speech.py b/src/opennotebookllm/inference/text_to_speech.py index 95e28f7..17bb31d 100644 --- a/src/opennotebookllm/inference/text_to_speech.py +++ b/src/opennotebookllm/inference/text_to_speech.py @@ -1,8 +1,8 @@ import numpy as np -from src.opennotebookllm.inference.model_loaders import ( +from opennotebookllm.inference.model_loaders import ( load_parler_tts_model_and_tokenizer, ) -from src.opennotebookllm.podcast_maker.config import SpeakerConfig +from opennotebookllm.podcast_maker.config import SpeakerConfig def _speech_generation_parler(input_text: str, tts_config: SpeakerConfig) -> np.ndarray: diff --git a/src/opennotebookllm/podcast_maker/script_to_audio.py b/src/opennotebookllm/podcast_maker/script_to_audio.py index 7daaa62..3fa8aa3 100644 --- a/src/opennotebookllm/podcast_maker/script_to_audio.py +++ b/src/opennotebookllm/podcast_maker/script_to_audio.py @@ -2,10 +2,10 @@ import numpy as np -from src.opennotebookllm.inference.text_to_speech import text_to_speech +from opennotebookllm.inference.text_to_speech import text_to_speech from scipy.io.wavfile import write -from src.opennotebookllm.podcast_maker.config import ( +from opennotebookllm.podcast_maker.config import ( PodcastConfig, SpeakerConfig, speaker_1_description, diff --git a/tests/conftest.py b/tests/conftest.py index 9cc1099..df00e4b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import pytest -from src.opennotebookllm.podcast_maker.config import ( +from opennotebookllm.podcast_maker.config import ( PodcastConfig, SpeakerConfig, speaker_1_description, diff --git a/tests/integration/test_text_to_text_to_speech.py b/tests/integration/test_text_to_text_to_speech.py index d737c2e..d2d2636 100644 --- a/tests/integration/test_text_to_text_to_speech.py +++ b/tests/integration/test_text_to_text_to_speech.py @@ -1,11 +1,11 @@ import os from pathlib import Path -from src.opennotebookllm.inference.model_loaders import load_llama_cpp_model -from src.opennotebookllm.inference.text_to_speech import text_to_speech -from src.opennotebookllm.inference.text_to_text import text_to_text -from src.opennotebookllm.podcast_maker.config import PodcastConfig -from src.opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file +from opennotebookllm.inference.model_loaders import load_llama_cpp_model +from opennotebookllm.inference.text_to_speech import text_to_speech +from opennotebookllm.inference.text_to_text import text_to_text +from opennotebookllm.podcast_maker.config import PodcastConfig +from opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file def test_text_to_text_to_speech(tmp_path: Path, podcast_config: PodcastConfig): diff --git a/tests/unit/inference/test_model_loaders.py b/tests/unit/inference/test_model_loaders.py index bff8a62..ff1f5cd 100644 --- a/tests/unit/inference/test_model_loaders.py +++ b/tests/unit/inference/test_model_loaders.py @@ -3,7 +3,7 @@ from opennotebookllm.inference.model_loaders import load_llama_cpp_model from transformers import PreTrainedModel, PreTrainedTokenizerBase -from src.opennotebookllm.inference.model_loaders import ( +from opennotebookllm.inference.model_loaders import ( load_parler_tts_model_and_tokenizer, ) diff --git a/tests/unit/inference/test_text_to_speech.py b/tests/unit/inference/test_text_to_speech.py index 44daed0..e611522 100644 --- a/tests/unit/inference/test_text_to_speech.py +++ b/tests/unit/inference/test_text_to_speech.py @@ -1,9 +1,9 @@ from pathlib import Path -from src.opennotebookllm.inference.text_to_speech import text_to_speech +from opennotebookllm.inference.text_to_speech import text_to_speech -from src.opennotebookllm.podcast_maker.config import PodcastConfig -from src.opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file +from opennotebookllm.podcast_maker.config import PodcastConfig +from opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file def test_text_to_speech_parler( diff --git a/tests/unit/podcast_maker/test_script_to_audio.py b/tests/unit/podcast_maker/test_script_to_audio.py index 5d2c871..c94ff02 100644 --- a/tests/unit/podcast_maker/test_script_to_audio.py +++ b/tests/unit/podcast_maker/test_script_to_audio.py @@ -3,8 +3,8 @@ import numpy as np -from src.opennotebookllm.podcast_maker.config import PodcastConfig -from src.opennotebookllm.podcast_maker.script_to_audio import ( +from opennotebookllm.podcast_maker.config import PodcastConfig +from opennotebookllm.podcast_maker.script_to_audio import ( parse_script_to_waveform, save_waveform_as_file, )