{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from openai import OpenAI\n",
    "client = OpenAI(api_key=\"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\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import glob\n",
    "import json\n",
    "import random\n",
    "\n",
    "filepaths = [\"/home/christian/code/christian/metadata/gpt/source_playlists.txt\"]\n",
    "\n",
    "prompts = []\n",
    "for filepath in filepaths:\n",
    "    with open(filepath, \"r\") as file:\n",
    "        lines = file.readlines()\n",
    "\n",
    "    for line in lines:\n",
    "        line = line.strip('\\n')\n",
    "        prompts.append(line)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['High Fidelity', 'Dynamic Range', 'Analog Warmth', 'Digital Clarity', 'Vintage Vinyl', 'Mastering Magic', 'Studio Perfection', 'Immersive Audio', 'Bootleg Culture', 'Minimalist Mixes', 'Experimental Edges', 'Sonic Texture', 'Field Recordings', 'Acoustic Authenticity', 'Spatial Soundscapes', 'Psychoacoustic Effects', 'Compressed Beats', 'Underproduced Uniqueness', 'Eco-Sound Engineering', 'Phase Effects', 'Loudness War', 'Audiophile', 'Chill Vibes Only', 'Road Trip Anthems', 'Retro 80s Hits', 'Summer Beach Party', 'Workout Boosters', 'Indie Dreams', 'Jazz Nights', 'Classical Mornings', 'Pop Icons', 'Rock Legends', 'Hip-Hop Beats', 'Relaxing Acoustic', 'Late Night Grooves', 'Party Starters', 'Study Sessions', 'Sunday Brunch', 'Golden Oldies', 'Feel Good Favorites', 'Reggae Sunsplash', 'Soulful Evenings', 'Motivation Mix', 'Rainy Day Reflections', 'Folklore and Firelight', 'Dance Floor Fillers', 'Deep House Dive', 'Country Roads', 'Cinematic Scores', 'Lullabies for Sleep', 'Guitar Greats', 'Divas of Pop', 'R&B Love', 'Metal Mayhem', 'Punk Rock Rebellion', 'Blues Brew', 'Electro Energizers', 'Love Songs', 'Nostalgia Hits', 'Holiday Classics', 'World Wanderlust', 'Cafe Background', 'Morning Motivation', 'Zen Meditation', 'Midnight Jazz', 'Gothic Melodies', 'Latin Fever', 'Celtic Echoes', 'Psychedelic Trip', 'Groovy 70s', 'Hardcore Workout', 'Grunge Spirit', 'K-pop Stars', 'Alt-Rock Adventures', 'Silky Smooth Jazz', 'Vocal Virtuosos', 'Indie Chillout', 'Reggaeton Rhythms', 'Bhangra Beats', 'Trap Trends', 'African Beats', 'Festival Anthems', 'Opera Overtures', 'Experimental Edge', 'Dubstep Drops', 'Winter Warmers', 'Spring Awakening', 'Autumn Acoustics', 'Classics Reborn', 'Family Road Trip', 'Karaoke Favorites', 'New Wave Revival', 'Flashback Funk', 'Dream Pop Delights', 'Bluegrass Bliss', 'Disco Fever', \"Ska Skankin'\", 'Emo Embers', 'Shoegaze Shades', 'Trip-Hop Travels', 'Wedding Wonders', 'Halloween Haunts', 'Christmas Cheer', 'Chillwave Currents', 'Acid Jazz Afternoons', 'Girl Power', 'Instrumental Inspirations', 'Throwback Thursdays', 'Synthwave Escape', 'Lo-fi Landscapes', 'Midnight in My Mind', 'Feels Like Floating', 'Retrograde Jams', 'Neon Dreams & Caffeine Streams', 'Alt TikTok Bops', 'Study Sesh Essentials', 'Cloud Nine Vibes', 'Euphoria Roadtrip', 'Lo-Fi Love Letters', 'No Skip Society', 'Chillhop to Study/Relax To', 'Bedroom Pop Anthems', 'Sad Girl Autumn', 'Vibe Check', 'Skater Park Sunsets', 'Moonlit Melancholy', 'Hype House Tracks', 'Indie Galaxy Exploration', 'Glitch in the Matrix', 'Sunday Mornings in Bed', 'Dreamcore & Night Drives', 'Spilled Tea & Spilled Ink', 'Summer Nostalgia', 'Ghostin’ Through Genres', 'Wavy Beats & Lazy Days', 'Thrift Shop Soundtrack', 'Digital Daydreams', 'Late Night Confessions', 'Heartbreak Hotel', 'Soft Sounds for Hard Days', 'Glowstick Nights', 'Sunrise Serenades', 'Pajama Party Jams', '100% That Witch', 'Cosmic Journeys', 'Melanin Poppin’', 'Sing in the Shower', 'Quarantine Queen', 'Rebel Without a Cause', 'Feel-Good Throwbacks', 'TikTok Treasures', 'Wanderlust Wind Down', 'Festival Fever', 'Crush Culture', 'Scream Sings in the Car', 'Vegan Vibes', 'Study Break Brain Reset', 'Meme Music Central', 'Grunge Aesthetic', 'Bubblegum Bass']\n",
      "160\n",
      "['African Beats', 'Trip-Hop Travels', 'Audiophile', 'Reggaeton Rhythms', 'Sunrise Serenades', 'Skater Park Sunsets', 'Dream Pop Delights', 'R&B Love', 'Digital Daydreams', 'Chillwave Currents']\n"
     ]
    }
   ],
   "source": [
    "print(prompts)\n",
    "print(len(prompts))\n",
    "prompts_subset = random.choices(prompts, k=10)\n",
    "print(prompts_subset)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "system_prompt = \"\"\"You are a music expert. You are given a playlist name and you are to provide a list of at least 100 songs that fit the playlist. \n",
    "You are to return only a list of songs in the format of a jsonl file. The jsonl file should have the following format: {\"song_name\": \"song_name\", \"artist_name\": \"artist_name\"}\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loaded 3 results from /home/christian/code/christian/metadata/gpt/results.json\n"
     ]
    }
   ],
   "source": [
    "\n",
    "# load results from json\n",
    "outputs_filepath = \"/home/christian/code/christian/metadata/gpt/results.json\"\n",
    "if os.path.exists(outputs_filepath):\n",
    "    with open(outputs_filepath, \"r\") as fp:\n",
    "        results = json.load(fp)\n",
    "    print(f\"Loaded {len(results)} results from {outputs_filepath}\")\n",
    "else:\n",
    "    results = {}\n",
    "    print(f\"No results found in {outputs_filepath}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  0%|          | 0/100 [00:00<?, ?it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Skipping High Fidelity because it already exists\n",
      "Skipping Dynamic Range because it already exists\n",
      "Skipping Analog Warmth because it already exists\n",
      "Skipping Digital Clarity because it already exists\n",
      "Skipping Vintage Vinyl because it already exists\n",
      "Skipping Mastering Magic because it already exists\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  7%|▋         | 7/100 [00:30<06:46,  4.37s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Studio Perfection\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  8%|▊         | 8/100 [00:58<12:45,  8.32s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for Immersive Audio\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  9%|▉         | 9/100 [01:34<20:55, 13.80s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Bootleg Culture\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 10%|█         | 10/100 [02:04<25:49, 17.22s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Minimalist Mixes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 11%|█         | 11/100 [02:32<29:24, 19.83s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error loading line: {\"song_name\": \"Mountains\", \"artist_name\": \"Prince\"]\n",
      "Expecting ',' delimiter: line 1 column 51 (char 50)\n",
      "Found 99 songs for Experimental Edges\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 12%|█▏        | 12/100 [03:02<33:04, 22.55s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 106 songs for Sonic Texture\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 13%|█▎        | 13/100 [03:28<33:57, 23.42s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 94 songs for Field Recordings\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 14%|█▍        | 14/100 [03:57<35:33, 24.81s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Acoustic Authenticity\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 15%|█▌        | 15/100 [04:15<32:24, 22.88s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Spatial Soundscapes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 16%|█▌        | 16/100 [04:42<33:44, 24.10s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Psychoacoustic Effects\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 17%|█▋        | 17/100 [05:10<35:01, 25.32s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 107 songs for Compressed Beats\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 18%|█▊        | 18/100 [05:29<31:48, 23.28s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error loading line: {\"song_name\": \"People Help The People\", \"artist_name\": \"Chel\"\n",
      "Expecting ',' delimiter: line 1 column 62 (char 61)\n",
      "Error loading line: }\n",
      "Expecting value: line 1 column 1 (char 0)\n",
      "Found 103 songs for Underproduced Uniqueness\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 19%|█▉        | 19/100 [06:05<36:34, 27.10s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 105 songs for Eco-Sound Engineering\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 20%|██        | 20/100 [06:24<33:04, 24.81s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Phase Effects\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 21%|██        | 21/100 [06:47<31:53, 24.23s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for Loudness War\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 22%|██▏       | 22/100 [07:15<32:59, 25.38s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 97 songs for Audiophile\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 23%|██▎       | 23/100 [07:40<32:26, 25.28s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Chill Vibes Only\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 24%|██▍       | 24/100 [08:15<35:45, 28.23s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 111 songs for Road Trip Anthems\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 25%|██▌       | 25/100 [08:37<32:51, 26.29s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Retro 80s Hits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 26%|██▌       | 26/100 [09:14<36:14, 29.38s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Summer Beach Party\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 27%|██▋       | 27/100 [09:48<37:36, 30.91s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Workout Boosters\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 28%|██▊       | 28/100 [10:18<36:42, 30.59s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Indie Dreams\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 29%|██▉       | 29/100 [10:41<33:25, 28.25s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Jazz Nights\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 30%|███       | 30/100 [11:37<42:39, 36.56s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 106 songs for Classical Mornings\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 31%|███       | 31/100 [12:09<40:40, 35.37s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Pop Icons\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 32%|███▏      | 32/100 [12:32<35:37, 31.44s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Rock Legends\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 33%|███▎      | 33/100 [12:57<33:13, 29.75s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 105 songs for Hip-Hop Beats\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 34%|███▍      | 34/100 [13:26<32:18, 29.37s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Relaxing Acoustic\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 35%|███▌      | 35/100 [13:46<28:53, 26.68s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for Late Night Grooves\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 36%|███▌      | 36/100 [14:35<35:24, 33.19s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Party Starters\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 37%|███▋      | 37/100 [15:01<32:47, 31.24s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Study Sessions\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 38%|███▊      | 38/100 [15:30<31:30, 30.49s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 105 songs for Sunday Brunch\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 39%|███▉      | 39/100 [16:02<31:26, 30.93s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Golden Oldies\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 40%|████      | 40/100 [16:28<29:30, 29.51s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 106 songs for Feel Good Favorites\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 41%|████      | 41/100 [17:01<30:01, 30.53s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Reggae Sunsplash\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 42%|████▏     | 42/100 [17:33<29:52, 30.90s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 105 songs for Soulful Evenings\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 43%|████▎     | 43/100 [17:53<26:19, 27.71s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Motivation Mix\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 44%|████▍     | 44/100 [18:18<25:06, 26.91s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Rainy Day Reflections\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 45%|████▌     | 45/100 [18:57<27:52, 30.42s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 105 songs for Folklore and Firelight\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 46%|████▌     | 46/100 [19:27<27:15, 30.29s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Dance Floor Fillers\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 47%|████▋     | 47/100 [19:58<26:58, 30.54s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Deep House Dive\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 48%|████▊     | 48/100 [20:33<27:36, 31.86s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Country Roads\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 49%|████▉     | 49/100 [20:57<25:08, 29.57s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 106 songs for Cinematic Scores\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 50%|█████     | 50/100 [21:18<22:29, 26.99s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Lullabies for Sleep\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 51%|█████     | 51/100 [21:49<23:07, 28.33s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Guitar Greats\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 52%|█████▏    | 52/100 [22:12<21:16, 26.59s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 97 songs for Divas of Pop\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 53%|█████▎    | 53/100 [22:39<20:51, 26.63s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for R&B Love\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 54%|█████▍    | 54/100 [23:14<22:22, 29.18s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Metal Mayhem\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 55%|█████▌    | 55/100 [23:40<21:11, 28.26s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 97 songs for Punk Rock Rebellion\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 56%|█████▌    | 56/100 [24:03<19:36, 26.73s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error loading line: {\"song_name\": \"Farther Up the Road\", \"artist_name\": \"Bobby \"Blue\" Bland\"}\n",
      "Expecting ',' delimiter: line 1 column 61 (char 60)\n",
      "Found 102 songs for Blues Brew\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 57%|█████▋    | 57/100 [24:41<21:31, 30.02s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Electro Energizers\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 58%|█████▊    | 58/100 [25:14<21:37, 30.88s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Love Songs\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 59%|█████▉    | 59/100 [25:37<19:34, 28.63s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 106 songs for Nostalgia Hits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 60%|██████    | 60/100 [26:24<22:41, 34.05s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 96 songs for Holiday Classics\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 61%|██████    | 61/100 [26:55<21:35, 33.22s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for World Wanderlust\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 62%|██████▏   | 62/100 [27:17<18:54, 29.85s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Cafe Background\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 63%|██████▎   | 63/100 [27:41<17:14, 27.95s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for Morning Motivation\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 64%|██████▍   | 64/100 [28:14<17:44, 29.58s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Zen Meditation\n",
      "Found 98 songs for Midnight Jazz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 66%|██████▌   | 66/100 [29:16<17:10, 30.32s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error loading line: {\"song_name\": \"Yesterday's Gone\", \"artist_name\": \"Charlie\")\n",
      "Expecting ',' delimiter: line 1 column 59 (char 58)\n",
      "Found 102 songs for Gothic Melodies\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 67%|██████▋   | 67/100 [29:50<17:15, 31.38s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Latin Fever\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 68%|██████▊   | 68/100 [30:11<15:07, 28.37s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Celtic Echoes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 69%|██████▉   | 69/100 [30:39<14:33, 28.16s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Psychedelic Trip\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 70%|███████   | 70/100 [31:03<13:30, 27.01s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 95 songs for Groovy 70s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 71%|███████   | 71/100 [31:33<13:28, 27.87s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Hardcore Workout\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 72%|███████▏  | 72/100 [32:03<13:16, 28.44s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Grunge Spirit\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 73%|███████▎  | 73/100 [32:33<13:02, 28.98s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 97 songs for K-pop Stars\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 74%|███████▍  | 74/100 [33:22<15:14, 35.16s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Alt-Rock Adventures\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 75%|███████▌  | 75/100 [34:31<18:49, 45.17s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for Silky Smooth Jazz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 76%|███████▌  | 76/100 [35:05<16:47, 41.96s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for Vocal Virtuosos\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 77%|███████▋  | 77/100 [35:28<13:49, 36.09s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 98 songs for Indie Chillout\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 78%|███████▊  | 78/100 [36:05<13:19, 36.32s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Reggaeton Rhythms\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 79%|███████▉  | 79/100 [36:29<11:30, 32.86s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 106 songs for Bhangra Beats\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 80%|████████  | 80/100 [37:11<11:50, 35.51s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 109 songs for Trap Trends\n",
      "Skipping African Beats because it already exists\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 82%|████████▏ | 82/100 [37:36<07:27, 24.86s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 105 songs for Festival Anthems\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 83%|████████▎ | 83/100 [38:10<07:39, 27.02s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Opera Overtures\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 84%|████████▍ | 84/100 [38:33<06:57, 26.08s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Experimental Edge\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 85%|████████▌ | 85/100 [39:35<08:58, 35.93s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Dubstep Drops\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 86%|████████▌ | 86/100 [40:04<07:56, 34.04s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Winter Warmers\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 87%|████████▋ | 87/100 [40:27<06:39, 30.72s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Spring Awakening\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 88%|████████▊ | 88/100 [40:51<05:45, 28.77s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 98 songs for Autumn Acoustics\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 89%|████████▉ | 89/100 [41:18<05:12, 28.38s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 102 songs for Classics Reborn\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 90%|█████████ | 90/100 [41:41<04:27, 26.79s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Family Road Trip\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 91%|█████████ | 91/100 [42:04<03:49, 25.54s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 100 songs for Karaoke Favorites\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 92%|█████████▏| 92/100 [42:25<03:14, 24.28s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 106 songs for New Wave Revival\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 93%|█████████▎| 93/100 [42:54<02:59, 25.65s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error loading line: {\"song_name\": \"Shame\", \"artist_name\": \"Evelyn \"Champagne\" King\"}\n",
      "Expecting ',' delimiter: line 1 column 48 (char 47)\n",
      "Error loading line: {\"song_name\": \"Love Come Down\", \"artist_name\": \"Evelyn \"Champagne\" King\"}\n",
      "Expecting ',' delimiter: line 1 column 57 (char 56)\n",
      "Found 105 songs for Flashback Funk\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 94%|█████████▍| 94/100 [43:22<02:37, 26.32s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 94 songs for Dream Pop Delights\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 95%|█████████▌| 95/100 [43:48<02:11, 26.33s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 99 songs for Bluegrass Bliss\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 96%|█████████▌| 96/100 [44:17<01:47, 26.90s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 103 songs for Disco Fever\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 97%|█████████▋| 97/100 [44:40<01:17, 25.83s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 101 songs for Ska Skankin'\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 98%|█████████▊| 98/100 [45:17<00:58, 29.12s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 104 songs for Emo Embers\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 99%|█████████▉| 99/100 [45:48<00:29, 29.87s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 96 songs for Shoegaze Shades\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 100/100 [46:27<00:00, 27.87s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error loading line: \n",
      "Expecting value: line 1 column 1 (char 0)\n",
      "Error loading line: \n",
      "Expecting value: line 1 column 1 (char 0)\n",
      "Found 103 songs for Trip-Hop Travels\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "from tqdm import tqdm\n",
    "\n",
    "for prompt in tqdm(prompts[:100]):\n",
    "    if prompt in results:\n",
    "        print(f\"Skipping {prompt} because it already exists\")\n",
    "        continue\n",
    "    completion = client.chat.completions.create(\n",
    "        model=\"gpt-4o\",\n",
    "        messages=[\n",
    "            {\"role\": \"system\", \"content\": system_prompt},\n",
    "            {\"role\": \"user\", \"content\": prompt}\n",
    "        ],\n",
    "    )\n",
    "\n",
    "    string = completion.choices[0].message.content\n",
    "\n",
    "    # convert string to json\n",
    "    results[prompt] = []\n",
    "    for line in string.split('\\n'):\n",
    "        try:\n",
    "            song_obj = json.loads(line)\n",
    "            results[prompt].append(song_obj)\n",
    "        except Exception as e:\n",
    "            print(f\"Error loading line: {line}\")\n",
    "            print(e)\n",
    "\n",
    "    print(f\"Found {len(results[prompt])} songs for {prompt}\")\n",
    "\n",
    "    # save results to json\n",
    "    with open(outputs_filepath, \"w\") as fp:\n",
    "        json.dump(results, fp, indent=2)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "African Beats\n",
      "\n",
      "105\n",
      "1. Jerusalema - Master KG ft. Nomcebo Zikode\n",
      "2. Ye - Burna Boy\n",
      "3. Djadja - Aya Nakamura\n",
      "4. Soweto Blues - Nina Simone\n",
      "5. Johnny - Yemi Alade\n",
      "6. Wombo Lombo - Angélique Kidjo\n",
      "7. African Queen - 2Baba\n",
      "8. Dumebi - Rema\n",
      "9. Pana - Tekno\n",
      "10. Khona - Mafikizolo ft. Uhuru\n",
      "11. Fall - Davido\n",
      "12. Oliver Twist - D'banj\n",
      "13. Skelewu - Davido\n",
      "14. Come Closer - WizKid ft. Drake\n",
      "15. Aye - Davido\n",
      "16. Mad Over You - Runtown\n",
      "17. Akanamali - Sun-El Musician ft. Samthing Soweto\n",
      "18. On the Low - Burna Boy\n",
      "19. Bum Bum - Timaya\n",
      "20. Soco - Starboy ft. WizKid, Terri, Spotless, Ceeza Milli\n",
      "21. Leg Over - Mr Eazi\n",
      "22. If - Davido\n",
      "23. Elo - Bra Hugh\n",
      "24. Gbona - Burna Boy\n",
      "25. Zamina mina (Zangalewa) - Golden Sounds\n",
      "26. Manya - Mut4y ft. WizKid\n",
      "27. Kukere - Iyanya\n",
      "28. Ojuelegba - WizKid\n",
      "29. Love Nwantiti - CKay\n",
      "30. Do Like That - Korede Bello\n",
      "31. Jaho - Kizz Daniel\n",
      "32. Gongo Aso - 9ice\n",
      "33. Dance - Tekno\n",
      "34. Ke Star - Focalistic ft. Vigro Deep\n",
      "35. Vuli Ndlela - Brenda Fassie\n",
      "36. Destiny - Burna Boy\n",
      "37. Kokoma - K9\n",
      "38. Jowo - Davido\n",
      "39. My Woman, My Everything - Patoranking ft. Wande Coal\n",
      "40. Drogba (Joanna) - Afro B\n",
      "41. Essence - WizKid ft. Tems\n",
      "42. Mama - Kiss Daniel\n",
      "43. Melanin - Sauti Sol ft. Patoranking\n",
      "44. African Beauty - Diamond Platnumz ft. Omarion\n",
      "45. Pakurumo - WizKid\n",
      "46. Ngud' - Kwesta ft. Cassper Nyovest\n",
      "47. Sulühlue - Aṣa\n",
      "48. Love Is Blind - Black Coffee ft. Toshi\n",
      "49. Fever - WizKid\n",
      "50. I Do - La Sauce\n",
      "51. She Don't Love You - Magnum K.I.M ft. M.anifest\n",
      "52. Omo Ado - R2Bees\n",
      "53. Ada - Kiss Daniel\n",
      "54. Sitting on Top of the World - Da L.E.S ft. Buffalo Souljah\n",
      "55. Hello - Adele (Cover by Khayelitsha United Mambazo Choir)\n",
      "56. Eno for Dey - Efya\n",
      "57. Baby - Joeboy\n",
      "58. Scream - Reynolds the Gentleman ft. Paapa\n",
      "59. African Time - K.O ft. Josiah De Disciple\n",
      "60. Fall on Your Sword - Raphael Saadiq\n",
      "61. Bado - Rayvanny ft. Mbosso\n",
      "62. This Year - Phyno ft. Teni\n",
      "63. Success - MC Galaxy\n",
      "64. Marry Me - Falz ft. Yemi Alade & Poe\n",
      "65. Corner - Kidi\n",
      "66. Ready - Abdiel & Rotimi ft. Imanse\n",
      "67. Convertible - NaakMusiQ\n",
      "68. Kedike - Chidinma\n",
      "69. Dance for Me - Eugy & Mr Eazi\n",
      "70. Jamaica - Shekhinah\n",
      "71. Boss Zonke - Riky Rick\n",
      "72. Coller La Petite - Franko\n",
      "73. My Jaber - H_art the Band ft. Brizzy Annechild\n",
      "74. Boujee - Sho Madjozi\n",
      "75. Unconquered - Black Motion\n",
      "76. Soweto Baby - DJ Maphorisa ft. WizKid & DJ Buckz\n",
      "77. My Strength - Listenbee ft. Nazizi\n",
      "78. Amor - Harmonize ft. Ghadaff\n",
      "79. Collide - Justine Skye ft. Tyga\n",
      "80. Sara Pawa - Blasto\n",
      "81. Way Up - Sauti Sol ft. Khaligraph Jones\n",
      "82. Sekem - MC Galaxy\n",
      "83. Tonight - DJ Tira ft. Joocy & TNS\n",
      "84. Whine - Mr Leo\n",
      "85. African Woman - Runtown\n",
      "86. Kilometre - Burna Boy\n",
      "87. Nana - Diamond Platnumz ft. Flavour\n",
      "88. That’s for Me - Rouge ft. Yipikiyay\n",
      "89. All for You - M.anifest ft. Simi\n",
      "90. Akanamali - Afrotraction ft. Amanda Black\n",
      "91. Sweet Mother - Prince Nico Mbarga\n",
      "92. Midnight Drum - Mafikizolo ft. WizKid & DJ Maphorisa\n",
      "93. Obianuju - Duncan Mighty\n",
      "94. Maria - Rayvanny\n",
      "95. Ngixolele - DJ Naves\n",
      "96. Dont Let Go - Rowlene ft. Lastee\n",
      "97. Muye - Chura ft. Olamide\n",
      "98. Taitai - Sheebah\n",
      "99. Radio Love - Diamond Platnumz ft. Perruzzi\n",
      "100. Jumbolo - Bracket\n",
      "101. Shut Up and Groove - DEAN ft. Zico\n",
      "102. Sunshine - D—Black ft. Quamina MP\n",
      "103. Faya - VJ Adams ft. Praiz\n",
      "104. Number 1 - Zakes Bantwini\n",
      "105. African Warrior - 2Baba\n",
      "High Fidelity\n",
      "\n",
      "105\n",
      "1. Train in Vain - The Clash\n",
      "2. Let's Get It On - Marvin Gaye\n",
      "3. Crocodile Rock - Elton John\n",
      "4. You're Gonna Miss Me - 13th Floor Elevators\n",
      "5. Somebody's Baby - Jackson Browne\n",
      "6. Most of the Time - Bob Dylan\n",
      "7. Walking on Sunshine - Katrina and the Waves\n",
      "8. What a Wonderful World - Louis Armstrong\n",
      "9. Let's Stay Together - Al Green\n",
      "10. I Just Called to Say I Love You - Stevie Wonder\n",
      "11. Sweet Jane - The Velvet Underground\n",
      "12. Baby, I Love Your Way - Peter Frampton\n",
      "13. Sittin' on the Dock of the Bay - Otis Redding\n",
      "14. Hit the Road Jack - Ray Charles\n",
      "15. Suspicious Minds - Elvis Presley\n",
      "16. Good Vibrations - The Beach Boys\n",
      "17. Respect - Aretha Franklin\n",
      "18. Dancing in the Dark - Bruce Springsteen\n",
      "19. All Out of Love - Air Supply\n",
      "20. Downtown - Petula Clark\n",
      "21. Sunny Afternoon - The Kinks\n",
      "22. Love is the Drug - Roxy Music\n",
      "23. Could It Be I'm Falling in Love - The Spinners\n",
      "24. Father and Son - Cat Stevens\n",
      "25. The Tide Is High - Blondie\n",
      "26. Higher and Higher - Jackie Wilson\n",
      "27. Do You Believe in Magic? - The Lovin' Spoonful\n",
      "28. It Ain't Me Babe - Johnny Cash\n",
      "29. Let's Dance - David Bowie\n",
      "30. Come Together - The Beatles\n",
      "31. Uptight (Everything's Alright) - Stevie Wonder\n",
      "32. The Joker - Steve Miller Band\n",
      "33. Baby Love - The Supremes\n",
      "34. Shout - The Isley Brothers\n",
      "35. Help Me, Rhonda - The Beach Boys\n",
      "36. If I Fell - The Beatles\n",
      "37. My Girl - The Temptations\n",
      "38. Maggie May - Rod Stewart\n",
      "39. All Day and All of the Night - The Kinks\n",
      "40. Wish You Were Here - Pink Floyd\n",
      "41. I'm Still Standing - Elton John\n",
      "42. Margaritaville - Jimmy Buffett\n",
      "43. Brandy (You're a Fine Girl) - Looking Glass\n",
      "44. Love Will Keep Us Together - Captain & Tennille\n",
      "45. I Heard It Through the Grapevine - Marvin Gaye\n",
      "46. Papa Was a Rollin' Stone - The Temptations\n",
      "47. Let's Spend the Night Together - The Rolling Stones\n",
      "48. In the Summertime - Mungo Jerry\n",
      "49. Handy Man - James Taylor\n",
      "50. These Boots Are Made for Walkin' - Nancy Sinatra\n",
      "51. Feel Like Makin' Love - Bad Company\n",
      "52. Walk on the Wild Side - Lou Reed\n",
      "53. Surfin' Safari - The Beach Boys\n",
      "54. Rhiannon - Fleetwood Mac\n",
      "55. Daydream - The Lovin' Spoonful\n",
      "56. A Hard Day's Night - The Beatles\n",
      "57. Night Moves - Bob Seger\n",
      "58. Sarah Smile - Daryl Hall & John Oates\n",
      "59. Rock Lobster - The B-52's\n",
      "60. Why Can't We Be Friends? - War\n",
      "61. Goodbye Yellow Brick Road - Elton John\n",
      "62. I Can See Clearly Now - Johnny Nash\n",
      "63. Crazy Little Thing Called Love - Queen\n",
      "64. Ventura Highway - America\n",
      "65. It's Too Late - Carole King\n",
      "66. The Weight - The Band\n",
      "67. Jack and Diane - John Mellencamp\n",
      "68. Brother Louie - Stories\n",
      "69. The Logical Song - Supertramp\n",
      "70. Mrs. Robinson - Simon & Garfunkel\n",
      "71. Where Is My Mind? - Pixies\n",
      "72. I Want to Know What Love Is - Foreigner\n",
      "73. Peace Train - Cat Stevens\n",
      "74. Listen to the Music - The Doobie Brothers\n",
      "75. You Ain't Seen Nothing Yet - Bachman-Turner Overdrive\n",
      "76. I Got You Babe - Sonny & Cher\n",
      "77. Love Train - The O'Jays\n",
      "78. Dream On - Aerosmith\n",
      "79. After the Gold Rush - Neil Young\n",
      "80. Can't You See - The Marshall Tucker Band\n",
      "81. Call Me - Blondie\n",
      "82. Oh Girl - The Chi-Lites\n",
      "83. Right Here Waiting - Richard Marx\n",
      "84. The Boys Are Back in Town - Thin Lizzy\n",
      "85. Sundown - Gordon Lightfoot\n",
      "86. It's My Life - Bon Jovi\n",
      "87. Me and Mrs. Jones - Billy Paul\n",
      "88. Livin' Thing - Electric Light Orchestra\n",
      "89. Norwegian Wood (This Bird Has Flown) - The Beatles\n",
      "90. You Really Got Me - The Kinks\n",
      "91. Barracuda - Heart\n",
      "92. Jet Airliner - Steve Miller Band\n",
      "93. Story of My Life - Social Distortion\n",
      "94. All You Need Is Love - The Beatles\n",
      "95. Your Song - Elton John\n",
      "96. Ain't No Mountain High Enough - Marvin Gaye & Tammi Terrell\n",
      "97. Unchain My Heart - Joe Cocker\n",
      "98. Bittersweet Symphony - The Verve\n",
      "99. Bad to the Bone - George Thorogood & The Destroyers\n",
      "100. Peaceful Easy Feeling - Eagles\n",
      "101. Brown Eyed Girl - Van Morrison\n",
      "102. Born to Be Wild - Steppenwolf\n",
      "103. Landslide - Fleetwood Mac\n",
      "104. American Pie - Don McLean\n",
      "105. New Kid in Town - Eagles\n",
      "Dynamic Range\n",
      "\n",
      "103\n",
      "1. Bohemian Rhapsody - Queen\n",
      "2. Stairway to Heaven - Led Zeppelin\n",
      "3. Space Oddity - David Bowie\n",
      "4. Paranoid Android - Radiohead\n",
      "5. Hotel California - Eagles\n",
      "6. Kashmir - Led Zeppelin\n",
      "7. A Day in the Life - The Beatles\n",
      "8. Hallelujah - Jeff Buckley\n",
      "9. Under Pressure - Queen & David Bowie\n",
      "10. November Rain - Guns N' Roses\n",
      "11. Comfortably Numb - Pink Floyd\n",
      "12. Blackbird - The Beatles\n",
      "13. Baba O'Riley - The Who\n",
      "14. Child in Time - Deep Purple\n",
      "15. The Sound of Silence - Simon & Garfunkel\n",
      "16. Clair de Lune - Claude Debussy\n",
      "17. Fake Plastic Trees - Radiohead\n",
      "18. Sultans of Swing - Dire Straits\n",
      "19. Shine On You Crazy Diamond - Pink Floyd\n",
      "20. Bridge Over Troubled Water - Simon & Garfunkel\n",
      "21. A Change Is Gonna Come - Sam Cooke\n",
      "22. Rhapsody in Blue - George Gershwin\n",
      "23. Hurt - Nine Inch Nails\n",
      "24. Hallelujah - Leonard Cohen\n",
      "25. The Thrill Is Gone - B.B. King\n",
      "26. Since I've Been Loving You - Led Zeppelin\n",
      "27. God Only Knows - The Beach Boys\n",
      "28. Visions of Gideon - Sufjan Stevens\n",
      "29. The Great Gig in the Sky - Pink Floyd\n",
      "30. Perfect Day - Lou Reed\n",
      "31. Purple Rain - Prince\n",
      "32. The Boxer - Simon & Garfunkel\n",
      "33. Man on the Moon - R.E.M.\n",
      "34. Here Comes the Sun - The Beatles\n",
      "35. Life on Mars? - David Bowie\n",
      "36. Everybody Hurts - R.E.M.\n",
      "37. Landslide - Fleetwood Mac\n",
      "38. Nightswimming - R.E.M.\n",
      "39. Into My Arms - Nick Cave & The Bad Seeds\n",
      "40. The End - The Doors\n",
      "41. Vincent - Don McLean\n",
      "42. Imagine - John Lennon\n",
      "43. Ten - Pearl Jam\n",
      "44. In Your Eyes - Peter Gabriel\n",
      "45. No Woman, No Cry - Bob Marley & The Wailers\n",
      "46. Sarabande - George Frideric Handel\n",
      "47. Wish You Were Here - Pink Floyd\n",
      "48. Brothers in Arms - Dire Straits\n",
      "49. The Unforgiven - Metallica\n",
      "50. With or Without You - U2\n",
      "51. Purple Haze - Jimi Hendrix\n",
      "52. Hurt - Johnny Cash\n",
      "53. Street Spirit (Fade Out) - Radiohead\n",
      "54. My Immortal - Evanescence\n",
      "55. Imagine - A Perfect Circle\n",
      "56. Mad World - Gary Jules\n",
      "57. Sound of Silence - Disturbed\n",
      "58. Wish You Were Here - Incubus\n",
      "59. Mind Mischief - Tame Impala\n",
      "60. The Rain Song - Led Zeppelin\n",
      "61. Gimme Shelter - The Rolling Stones\n",
      "62. Fake Empire - The National\n",
      "63. The Pretender - Foo Fighters\n",
      "64. Lazarus - David Bowie\n",
      "65. Black - Pearl Jam\n",
      "66. The Glass Prison - Dream Theater\n",
      "67. How to Disappear Completely - Radiohead\n",
      "68. Exit Music (For a Film) - Radiohead\n",
      "69. Knights of Cydonia - Muse\n",
      "70. Across the Universe - The Beatles\n",
      "71. November - Max Richter\n",
      "72. Set Fire to the Rain - Adele\n",
      "73. Come Away with Me - Norah Jones\n",
      "74. Time - Hans Zimmer\n",
      "75. Angel - Sarah McLachlan\n",
      "76. Both Sides, Now - Joni Mitchell\n",
      "77. Why Does It Always Rain on Me? - Travis\n",
      "78. Welcome to the Jungle - Guns N' Roses\n",
      "79. Breathe Me - Sia\n",
      "80. Teardrop - Massive Attack\n",
      "81. Runaway - Kanye West\n",
      "82. Canon in D - Johann Pachelbel\n",
      "83. Black Hole Sun - Soundgarden\n",
      "84. The Chain - Fleetwood Mac\n",
      "85. Boulevard of Broken Dreams - Green Day\n",
      "86. Street Spirit - Radiohead\n",
      "87. Chasing Cars - Snow Patrol\n",
      "88. Something - The Beatles\n",
      "89. Highway to Hell - AC/DC\n",
      "90. Life on Mars? - Seu Jorge\n",
      "91. Rocket Man - Elton John\n",
      "92. A Whiter Shade of Pale - Procol Harum\n",
      "93. Dust in the Wind - Kansas\n",
      "94. Enjoy the Silence - Depeche Mode\n",
      "95. The Air That I Breathe - The Hollies\n",
      "96. Bad - U2\n",
      "97. More Than a Feeling - Boston\n",
      "98. The Stranger - Billy Joel\n",
      "99. Wichita Lineman - Glen Campbell\n",
      "100. Heroes - David Bowie\n",
      "101. Jigsaw Falling into Place - Radiohead\n",
      "102. Tiny Dancer - Elton John\n",
      "103. I Will Always Love You - Whitney Houston\n"
     ]
    }
   ],
   "source": [
    "for playlist_name, songs in results.items():\n",
    "    print(playlist_name)\n",
    "    print()\n",
    "    print(len(songs))\n",
    "    for idx, song in enumerate(songs):\n",
    "        print(f\"{idx+1}. {song['song_name']} - {song['artist_name']}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "suno_env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
