Skip to content

Commit

Permalink
Rename to document_to_podcast
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo committed Nov 28, 2024
1 parent 226a034 commit e6dfaeb
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.vscode
6 changes: 3 additions & 3 deletions demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import streamlit as st
from huggingface_hub import list_repo_files

from opennotebookllm.preprocessing import DATA_LOADERS, DATA_CLEANERS
from opennotebookllm.inference.model_loaders import load_llama_cpp_model
from opennotebookllm.inference.text_to_text import text_to_text_stream
from document_to_podcast.preprocessing import DATA_LOADERS, DATA_CLEANERS
from document_to_podcast.inference.model_loaders import load_llama_cpp_model
from document_to_podcast.inference.text_to_text import text_to_text_stream

PODCAST_PROMPT = """
You are a podcast scriptwriter generating engaging and natural-sounding conversations in JSON format. The script features two speakers:
Expand Down
6 changes: 3 additions & 3 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# API Reference

::: opennotebookllm.preprocessing.data_cleaners
::: document_to_podcast.preprocessing.data_cleaners

::: opennotebookllm.inference.model_loaders
::: document_to_podcast.inference.model_loaders

::: opennotebookllm.inference.text_to_text
::: document_to_podcast.inference.text_to_text
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=48", "setuptools_scm[toml]>=6.3.1"]
build-backend = "setuptools.build_meta"

[project]
name = "opennotebookllm"
name = "document_to_podcast"
readme = "README.md"
license = {text = "Apache-2.0"}
requires-python = ">=3.10"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def clean_html(text: str) -> str:
- links
- meta tags
In addition, it calls [clean_with_regex][opennotebookllm.preprocessing.data_cleaners.clean_with_regex].
In addition, it calls [clean_with_regex][document_to_podcast.preprocessing.data_cleaners.clean_with_regex].
Examples:
>>> clean_html("<html><body><p>Hello, world! </p></body></html>"")
Expand All @@ -67,7 +67,7 @@ def clean_markdown(text: str) -> str:
This function removes:
- markdown images
In addition, it calls [clean_with_regex][opennotebookllm.preprocessing.data_cleaners.clean_with_regex].
In addition, it calls [clean_with_regex][document_to_podcast.preprocessing.data_cleaners.clean_with_regex].
Examples:
>>> clean_markdown('# Title with image ![alt text](image.jpg "Image Title")')
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_data_load_and_clean.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from opennotebookllm.preprocessing.data_cleaners import (
from document_to_podcast.preprocessing.data_cleaners import (
clean_html,
clean_with_regex,
clean_markdown,
)
from opennotebookllm.preprocessing.data_loaders import load_pdf, load_txt
from document_to_podcast.preprocessing.data_loaders import load_pdf, load_txt


def test_load_and_clean_pdf(example_data):
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_model_load_and_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import pytest

from opennotebookllm.inference.model_loaders import load_llama_cpp_model
from opennotebookllm.inference.text_to_text import text_to_text, text_to_text_stream
from document_to_podcast.inference.model_loaders import load_llama_cpp_model
from document_to_podcast.inference.text_to_text import text_to_text, text_to_text_stream


def test_model_load_and_inference_text_to_text():
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/inference/test_model_loaders.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from llama_cpp import Llama

from opennotebookllm.inference.model_loaders import load_llama_cpp_model
from document_to_podcast.inference.model_loaders import load_llama_cpp_model


def test_load_llama_cpp_model():
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/preprocessing/test_data_cleaners.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from opennotebookllm.preprocessing.data_cleaners import (
from document_to_podcast.preprocessing.data_cleaners import (
clean_html,
clean_with_regex,
clean_markdown,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/preprocessing/test_data_loaders.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from opennotebookllm.preprocessing.data_loaders import load_pdf, load_txt, load_docx
from document_to_podcast.preprocessing.data_loaders import load_pdf, load_txt, load_docx


def test_load_pdf(example_data):
Expand Down

0 comments on commit e6dfaeb

Please sign in to comment.