diff --git a/recipes/quickstart/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb b/recipes/quickstart/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb index 6f128be3e810882c6641626bccbbcbff4a210067..107ce48220ff4064962f5239f1641c728836b699 100644 --- a/recipes/quickstart/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb +++ b/recipes/quickstart/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb @@ -59,7 +59,7 @@ "metadata": {}, "outputs": [], "source": [ - "pdf_path = './2402.13116v3.pdf'\n", + "pdf_path = './resources/2402.13116v3.pdf'\n", "DEFAULT_MODEL = \"meta-llama/Llama-3.2-1B-Instruct\"" ] }, @@ -469,7 +469,7 @@ "metadata": {}, "outputs": [], "source": [ - "INPUT_FILE = \"./extracted_text.txt\" # Replace with your file path\n", + "INPUT_FILE = \"./resources/extracted_text.txt\" # Replace with your file path\n", "CHUNK_SIZE = 1000 # Adjust chunk size if needed\n", "\n", "chunks = create_word_bounded_chunks(text, CHUNK_SIZE)\n", diff --git a/recipes/quickstart/NotebookLlama/Step-2-Transcript-Writer.ipynb b/recipes/quickstart/NotebookLlama/Step-2-Transcript-Writer.ipynb index 5c9388d06dfcca6a9c8a614c52762ac83aa0258a..ea25940b23cbd13ca5b863d1bab4b04bf353b8a8 100644 --- a/recipes/quickstart/NotebookLlama/Step-2-Transcript-Writer.ipynb +++ b/recipes/quickstart/NotebookLlama/Step-2-Transcript-Writer.ipynb @@ -162,7 +162,7 @@ "metadata": {}, "outputs": [], "source": [ - "INPUT_PROMPT = read_file_to_string('./clean_extracted_text.txt')" + "INPUT_PROMPT = read_file_to_string('./resources/clean_extracted_text.txt')" ] }, { @@ -298,7 +298,7 @@ "metadata": {}, "outputs": [], "source": [ - "with open('data.pkl', 'wb') as file:\n", + "with open('./resources/data.pkl', 'wb') as file:\n", " pickle.dump(save_string_pkl, file)" ] }, diff --git a/recipes/quickstart/NotebookLlama/Step-3-Re-Writer.ipynb b/recipes/quickstart/NotebookLlama/Step-3-Re-Writer.ipynb index 111e650508ad918e870229c335666ad56e37ce37..035d2b1a60a783f9283fb054039793fa7158c1e3 100644 --- a/recipes/quickstart/NotebookLlama/Step-3-Re-Writer.ipynb +++ b/recipes/quickstart/NotebookLlama/Step-3-Re-Writer.ipynb @@ -146,7 +146,7 @@ "source": [ "import pickle\n", "\n", - "with open('data.pkl', 'rb') as file:\n", + "with open('./resources/data.pkl', 'rb') as file:\n", " INPUT_PROMPT = pickle.load(file)" ] }, @@ -191,7 +191,7 @@ " \"text-generation\",\n", " model=MODEL,\n", " model_kwargs={\"torch_dtype\": torch.bfloat16},\n", - " device_map=\"cuda:7\",\n", + " device_map=\"auto\",\n", ")\n", "\n", "messages = [\n", @@ -249,7 +249,7 @@ "metadata": {}, "outputs": [], "source": [ - "with open('podcast_ready_data.pkl', 'wb') as file:\n", + "with open('./resources/podcast_ready_data.pkl', 'wb') as file:\n", " pickle.dump(save_string_pkl, file)" ] }, diff --git a/recipes/quickstart/NotebookLlama/Step-4-TTS-Workflow.ipynb b/recipes/quickstart/NotebookLlama/Step-4-TTS-Workflow.ipynb index 711996ee0b2427927e1a06c1ba6675964c65913d..a55ec8e28617618107fc54532ec283e6a2938a84 100644 --- a/recipes/quickstart/NotebookLlama/Step-4-TTS-Workflow.ipynb +++ b/recipes/quickstart/NotebookLlama/Step-4-TTS-Workflow.ipynb @@ -119,7 +119,9 @@ "source": [ "Generally in life, you set your device to \"cuda\" and are happy. \n", "\n", - "However, sometimes you want to compensate for things and set it to `cuda:7` to tell the system but even more-so the world that you have 8 GPUS:" + "However, sometimes you want to compensate for things and set it to `cuda:7` to tell the system but even more-so the world that you have 8 GPUS.\n", + "\n", + "Jokes aside please set `device = \"cuda\"` below if you're using a single GPU node." ] }, { @@ -289,7 +291,7 @@ "source": [ "import pickle\n", "\n", - "with open('./podcast_ready_data.pkl', 'rb') as file:\n", + "with open('./resources/podcast_ready_data.pkl', 'rb') as file:\n", " PODCAST_TEXT = pickle.load(file)" ] }, @@ -631,7 +633,7 @@ } ], "source": [ - "final_audio.export(\"_podcast.mp3\", \n", + "final_audio.export(\"./resources/_podcast.mp3\", \n", " format=\"mp3\", \n", " bitrate=\"192k\",\n", " parameters=[\"-q:a\", \"0\"])" diff --git a/recipes/quickstart/NotebookLlama/requirements.txt b/recipes/quickstart/NotebookLlama/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..34a27dc8185f426dba0e0e41583b7dc6a00b89dd --- /dev/null +++ b/recipes/quickstart/NotebookLlama/requirements.txt @@ -0,0 +1,15 @@ +# Core dependencies +PyPDF2>=3.0.0 +torch>=2.0.0 +transformers>=4.46.0 +accelerate>=0.27.0 +rich>=13.0.0 +ipywidgets>=8.0.0 +tqdm>=4.66.0 + +# Optional but recommended +jupyter>=1.0.0 +ipykernel>=6.0.0 + +# Warning handling +warnings>=0.1.0 \ No newline at end of file