KBVE / kbve

11 stars 13 forks source link

[MUSIC] : Polo G & Lil Baby - Be Something (Lofi Remix) #2121

Closed h0lybyte closed 3 weeks ago

h0lybyte commented 3 weeks ago

Music Suggestion Form

YouTube Link: https://www.youtube.com/watch?v=TecIZTn4DRA Title: Polo G & Lil Baby - Be Something (Lofi Remix) Genre: lofihiphop

Hint: Only genres that are acceptable are: dnb, chillstep, lofihiphop, nujazz, electroswing, edm, rock, jrock, studybeats, anime

github-actions[bot] commented 3 weeks ago

[DEBUG] Processing Music Action v0.0.10

github-actions[bot] commented 3 weeks ago

Atlas Music Response:

{
  "id": "chatcmpl-0c7a9bbb-a1d8-41f8-aafd-19f4835555bf",
  "object": "chat.completion",
  "created": 1719121096,
  "model": "mixtral-8x7b-32768",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Sure, here's how you can create a JSON output for the given dataset including a song's title with the band/artist, genre, and YouTube ID:\n\n1. First, prompt the user to input a song title with the band/artist within the title.\n2. Next, display the list of acceptable genres and ask the user to select a genre.\n3. After that, ask the user to provide a YouTube link for the song.\n4. Extract the YouTube ID from the link using regular expressions.\n5. Finally, generate a JSON output containing the following keys: \"title\", \"genre\", and \"youtube\\_id\".\n\nHere's an example Python code that implements the above steps:\n\n```python\nimport re\n\nacceptable_genres = ['dnb', 'chillstep', 'lofihiphop', 'nujazz', 'electroswing', 'edm', 'rock', 'jrock', 'studybeats', 'anime']\n\n# Prompt the user to input a song title with the band/artist within the title\ntitle = input(\"Enter the song title with the band/artist: \")\n\n# Display the list of acceptable genres and ask the user to select a genre\ngenre = input(\"Select a genre from the following: dnb, chillstep, lofihiphop, nujazz, electroswing, edm, rock, jrock, studybeats, anime\\n\")\nwhile genre not in acceptable_genres:\n    genre = input(\"Invalid genre. Please select a genre from the following: dnb, chillstep, lofihiphop, nujazz, electroswing, edm, rock, jrock, studybeats, anime\\n\")\n\n# Ask the user to provide a YouTube link for the song\nyoutube_link = input(\"Enter the YouTube link for the song: \")\n\n# Extract the YouTube ID from the link using regular expressions\nyoutube_id = re.search(r\"v=([-\\w]+)\", youtube_link).group(1)\n\n# Generate a JSON output containing the following keys: \"title\", \"genre\", and \"youtube_id\"\njson_output = {\n    \"title\": title,\n    \"genre\": genre,\n    \"youtube_id\": youtube_id\n}\n\n# Print the JSON output\nimport json\nprint(json.dumps(json_output, indent=4))\n```\n\nAssuming the user inputs the following information:\n\n* Song title: \"Polo G & Lil Baby - Be Something (Lofi Remix)\"\n* Genre: \"lofihiphop\"\n* YouTube link: \"<https://www.youtube.com/watch?v=TecIZTn4DRAn>\"\n\nThe output will be:\n\n```json\n{\n    \"title\": \"Polo G & Lil Baby - Be Something (Lofi Remix)\",\n    \"genre\": \"lofihiphop\",\n    \"youtube_id\": \"TecIZTn4DRAn\"\n}\n```"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 397,
    "prompt_time": 0.058881449,
    "completion_tokens": 686,
    "completion_time": 1.053053965,
    "total_tokens": 1083,
    "total_time": 1.111935414
  },
  "system_fingerprint": "fp_c5f20b5bb1",
  "x_groq": {
    "id": "req_01j11smacbe7p909q2d35np0eg"
  }
}
github-actions[bot] commented 3 weeks ago

Dear Lord Commander:

Sure, here's how you can create a JSON output for the given dataset including a song's title with the band/artist, genre, and YouTube ID:

1. First, prompt the user to input a song title with the band/artist within the title.
2. Next, display the list of acceptable genres and ask the user to select a genre.
3. After that, ask the user to provide a YouTube link for the song.
4. Extract the YouTube ID from the link using regular expressions.
5. Finally, generate a JSON output containing the following keys: "title", "genre", and "youtube\_id".

Here's an example Python code that implements the above steps:

```python
import re

acceptable_genres = ['dnb', 'chillstep', 'lofihiphop', 'nujazz', 'electroswing', 'edm', 'rock', 'jrock', 'studybeats', 'anime']

# Prompt the user to input a song title with the band/artist within the title
title = input("Enter the song title with the band/artist: ")

# Display the list of acceptable genres and ask the user to select a genre
genre = input("Select a genre from the following: dnb, chillstep, lofihiphop, nujazz, electroswing, edm, rock, jrock, studybeats, anime\n")
while genre not in acceptable_genres:
    genre = input("Invalid genre. Please select a genre from the following: dnb, chillstep, lofihiphop, nujazz, electroswing, edm, rock, jrock, studybeats, anime\n")

# Ask the user to provide a YouTube link for the song
youtube_link = input("Enter the YouTube link for the song: ")

# Extract the YouTube ID from the link using regular expressions
youtube_id = re.search(r"v=([-\w]+)", youtube_link).group(1)

# Generate a JSON output containing the following keys: "title", "genre", and "youtube_id"
json_output = {
    "title": title,
    "genre": genre,
    "youtube_id": youtube_id
}

# Print the JSON output
import json
print(json.dumps(json_output, indent=4))

Assuming the user inputs the following information:

The output will be:

{
    "title": "Polo G & Lil Baby - Be Something (Lofi Remix)",
    "genre": "lofihiphop",
    "youtube_id": "TecIZTn4DRAn"
}

Extracted Song Information:
```json
{
    "title": "Polo G & Lil Baby - Be Something (Lofi Remix)",
    "genre": "lofihiphop",
    "youtube_id": "TecIZTn4DRAn"
}