Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to document_to_podcast #25

Merged
merged 3 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 4 additions & 4 deletions pyproject.toml
daavoo marked this conversation as resolved.
Show resolved Hide resolved
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 Expand Up @@ -31,9 +31,9 @@ tests = [
]

[project.urls]
Documentation = "https://mozilla-ai.github.io/OpenNotebookLLM/"
Issues = "https://github.com/mozilla-ai/OpenNotebookLLM/issues"
Source = "https://github.com/mozilla-ai/OpenNotebookLLM"
Documentation = "https://mozilla-ai.github.io/document-to-podcast/"
Issues = "https://github.com/mozilla-ai/document-to-podcast/issues"
Source = "https://github.com/mozilla-ai/document-to-podcast"

[tool.setuptools.packages.find]
exclude = ["tests", "tests.*"]
Expand Down
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
Loading