{ "cells": [ { "cell_type": "markdown", "id": "be58b994-bc68-4166-91d5-282418b78864", "metadata": { "id": "be58b994-bc68-4166-91d5-282418b78864" }, "source": [ "## Project: Portfolio - Final Project (Instruction corner)" ] }, { "cell_type": "markdown", "id": "c5120b06-0abf-49e3-b54d-db8afa9eda01", "metadata": { "id": "c5120b06-0abf-49e3-b54d-db8afa9eda01" }, "source": [ "**Instructions for Students:**\n", "\n", "Please carefully follow these steps to complete and submit your assignment:\n", "\n", "1. **Completing the Assignment**: You are required to work on and complete all tasks in the provided assignment. Be disciplined and ensure that you thoroughly engage with each task.\n", " \n", "2. **Creating a Google Drive Folder**: If you don't previously have a folder for collecting assignments, you must create a new folder in your Google Drive. This will be a repository for all your completed assignment files, helping you keep your work organized and easy to access.\n", " \n", "3. **Uploading Completed Assignment**: Upon completion of your assignment, make sure to upload all necessary files, involving codes, reports, and related documents into the created Google Drive folder. Save this link in the 'Student Identity' section and also provide it as the last parameter in the `submit` function that has been provided.\n", " \n", "4. **Sharing Folder Link**: You're required to share the link to your assignment Google Drive folder. This is crucial for the submission and evaluation of your assignment.\n", " \n", "5. **Setting Permission toPublic**: Please make sure your **Google Drive folder is set to public**. This allows your instructor to access your solutions and assess your work correctly.\n", "\n", "Adhering to these procedures will facilitate a smooth assignment process for you and the reviewers." ] }, { "cell_type": "markdown", "id": "eca56111-19cb-46c0-a77b-11bd18c55673", "metadata": { "id": "eca56111-19cb-46c0-a77b-11bd18c55673" }, "source": [ "**Description:**\n", "\n", "Welcome to your final portfolio project assignment for AI Bootcamp. This is your chance to put all the skills and knowledge you've learned throughout the bootcamp into action by creating real-world AI application.\n", "\n", "You have the freedom to create any application or model, be it text-based or image-based or even voice-based or multimodal.\n", "\n", "To get you started, here are some ideas:\n", "\n", "1. **Sentiment Analysis Application:** Develop an application that can determine sentiment (positive, negative, neutral) from text data like reviews or social media posts. You can use Natural Language Processing (NLP) libraries like NLTK or TextBlob, or more advanced pre-trained models from transformers library by Hugging Face, for your sentiment analysis model.\n", "\n", "2. **Chatbot:** Design a chatbot serving a specific purpose such as customer service for a certain industry, a personal fitness coach, or a study helper. Libraries like ChatterBot or Dialogflow can assist in designing conversational agents.\n", "\n", "3. **Predictive Text Application:** Develop a model that suggests the next word or sentence similar to predictive text on smartphone keyboards. You could use the transformers library by Hugging Face, which includes pre-trained models like GPT-2.\n", "\n", "4. **Image Classification Application:** Create a model to distinguish between different types of flowers or fruits. For this type of image classification task, pre-trained models like ResNet or VGG from PyTorch or TensorFlow can be utilized.\n", "\n", "5. **News Article Classifier:** Develop a text classification model that categorizes news articles into predefined categories. NLTK, SpaCy, and sklearn are valuable libraries for text pre-processing, feature extraction, and building classification models.\n", "\n", "6. **Recommendation System:** Create a simplified recommendation system. For instance, a book or movie recommender based on user preferences. Python's Surprise library can assist in building effective recommendation systems.\n", "\n", "7. **Plant Disease Detection:** Develop a model to identify diseases in plants using leaf images. This project requires a good understanding of convolutional neural networks (CNNs) and image processing. PyTorch, TensorFlow, and OpenCV are all great tools to use.\n", "\n", "8. **Facial Expression Recognition:** Develop a model to classify human facial expressions. This involves complex feature extraction and classification algorithms. You might want to leverage deep learning libraries like TensorFlow or PyTorch, along with OpenCV for processing facial images.\n", "\n", "9. **Chest X-Ray Interpretation:** Develop a model to detect abnormalities in chest X-ray images. This task may require understanding of specific features in such images. Again, TensorFlow and PyTorch for deep learning, and libraries like SciKit-Image or PIL for image processing, could be of use.\n", "\n", "10. **Food Classification:** Develop a model to classify a variety of foods such as local Indonesian food. Pre-trained models like ResNet or VGG from PyTorch or TensorFlow can be a good starting point.\n", "\n", "11. **Traffic Sign Recognition:** Design a model to recognize different traffic signs. This project has real-world applicability in self-driving car technology. Once more, you might utilize PyTorch or TensorFlow for the deep learning aspect, and OpenCV for image processing tasks.\n", "\n", "**Submission:**\n", "\n", "Please upload both your model and application to Huggingface or your own Github account for submission.\n", "\n", "**Presentation:**\n", "\n", "You are required to create a presentation to showcase your project, including the following details:\n", "\n", "- The objective of your model.\n", "- A comprehensive description of your model.\n", "- The specific metrics used to measure your model's effectiveness.\n", "- A brief overview of the dataset used, including its source, pre-processing steps, and any insights.\n", "- An explanation of the methodology used in developing the model.\n", "- A discussion on challenges faced, how they were handled, and your learnings from those.\n", "- Suggestions for potential future improvements to the model.\n", "- A functioning link to a demo of your model in action.\n", "\n", "**Grading:**\n", "\n", "Submissions will be manually graded, with a select few given the opportunity to present their projects in front of a panel of judges. This will provide valuable feedback, further enhancing your project and expanding your knowledge base.\n", "\n", "Remember, consistent practice is the key to mastering these concepts. Apply your knowledge, ask questions when in doubt, and above all, enjoy the process. Best of luck to you all!\n" ] }, { "cell_type": "code", "execution_count": null, "id": "213a611a-c434-4894-ba35-689963ee5274", "metadata": { "id": "213a611a-c434-4894-ba35-689963ee5274", "cellView": "form" }, "outputs": [], "source": [ "# @title #### Student Identity\n", "student_id = \"REA6KIZML\" # @param {type:\"string\"}\n", "name = \"Shavira Zhalsabilla\" # @param {type:\"string\"}\n", "drive_link = \"https://drive.google.com/drive/folders/1l_vP2voZb_0yig7FHn6ktbrh5owiqLHF?usp=drive_link\" # @param {type:\"string\"}\n", "assignment_id = \"00_portfolio_project\"" ] }, { "cell_type": "markdown", "id": "2c97aef3-b747-49f7-99e0-4086c03e4200", "metadata": { "id": "2c97aef3-b747-49f7-99e0-4086c03e4200" }, "source": [ "## Installation and Import `rggrader` Package (for submit final project)" ] }, { "cell_type": "code", "execution_count": null, "id": "36c07e23-0280-467f-b0d2-44d966253bb4", "metadata": { "id": "36c07e23-0280-467f-b0d2-44d966253bb4" }, "outputs": [], "source": [ "%pip install rggrader\n", "from rggrader import submit_image\n", "from rggrader import submit" ] }, { "cell_type": "markdown", "id": "a4af3420-ff0e-472b-8b44-7a495ddf76c3", "metadata": { "id": "a4af3420-ff0e-472b-8b44-7a495ddf76c3" }, "source": [ "## Working Space\n", "\n", "For result go to 4.2 Temporary Result" ] }, { "cell_type": "code", "execution_count": null, "id": "c1fb239a-1c81-4476-9009-d87abadf9506", "metadata": { "id": "c1fb239a-1c81-4476-9009-d87abadf9506" }, "outputs": [], "source": [ "# Write your code here\n", "# Feel free to add new code block as needed\n", "\n" ] }, { "cell_type": "markdown", "source": [ "### 0.1 Data Source\n", "\n", "[Kaggle: Spotify and YouTube](https://www.kaggle.com/datasets/salvatorerastelli/spotify-and-youtube/data)\n", "\n", "### 0.2 Resources\n", "\n", "1. [Large Language Models (LLMs) for Recommendations (Paper Walkthrough)](https://www.youtube.com/watch?app=desktop&v=g0EJgVAO7QM)\n", "2. [Using Large Language Models as Recommendation Systems](https://towardsdatascience.com/using-large-language-models-as-recommendation-systems-49e8aeeff29b/)\n", "3. [How to use LLMs for creating a content-based recommendation system for entertainment platforms?](https://www.leewayhertz.com/build-content-based-recommendation-for-entertainment-using-llms/) -> reasons here.\n", "4. [LLM game recommender](https://medium.com/@elisarm.antunes/llm-game-recommender-8403e232db4b)\n", "5. [Build a semantic book recommender](https://www.freecodecamp.org/news/build-a-semantic-book-recommender-using-an-llm-and-python/)\n", "6. [Fine-Tuning DeepSeek LLM: Adapting Open-Source AI for Your Needs](https://abhishek-maheshwarappa.medium.com/fine-tuning-deepseek-llm-adapting-open-source-ai-for-your-needs-12a7e5572fa5)\n", "7. [Deepseek V3 vs R1](https://www.datacamp.com/blog/deepseek-r1-vs-v3)\n", "8. [The Complete Guide to DeepSeek Models: From V3 to R1 and Beyond](https://www.bentoml.com/blog/the-complete-guide-to-deepseek-models-from-v3-to-r1-and-beyond)\n", "9. [Evaluating Large Language Model (LLM) systems: Metrics, challenges, and best practices](https://medium.com/data-science-at-microsoft/evaluating-llm-systems-metrics-challenges-and-best-practices-664ac25be7e5)" ], "metadata": { "id": "W8UEHhr0FFgk" }, "id": "W8UEHhr0FFgk" }, { "cell_type": "markdown", "source": [ "### 1 Import dataset" ], "metadata": { "id": "LVuOysEiAIoU" }, "id": "LVuOysEiAIoU" }, { "cell_type": "code", "source": [ "# Mount Gdrive for importing file\n", "from google.colab import drive\n", "drive.mount('/content/drive')\n", "\n", "path = '/content/drive/MyDrive/mastering-ai/final-project-REA6KIZML-shavira/'" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "zkjivrr9AMWK", "outputId": "85dfd455-39a8-4ff9-ad10-78966c89e108" }, "id": "zkjivrr9AMWK", "execution_count": 1, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Mounted at /content/drive\n" ] } ] }, { "cell_type": "code", "source": [ "# To show all columns and rows\n", "import pandas as pd\n", "\n", "pd.set_option('display.max_columns', None)\n", "pd.set_option('display.max_rows', None)" ], "metadata": { "id": "aSXB4WQADRsw" }, "id": "aSXB4WQADRsw", "execution_count": 2, "outputs": [] }, { "cell_type": "code", "source": [ "# Import data\n", "df = pd.read_csv(f\"{path}Spotify_Youtube.csv\")\n", "df = df.drop('Unnamed: 0', axis=1)\n", "df.info()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "IZIEYZwdCrZK", "outputId": "c84a5956-070c-421e-d85e-676c47958529" }, "id": "IZIEYZwdCrZK", "execution_count": 3, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\n", "RangeIndex: 20718 entries, 0 to 20717\n", "Data columns (total 27 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 Artist 20718 non-null object \n", " 1 Url_spotify 20718 non-null object \n", " 2 Track 20718 non-null object \n", " 3 Album 20718 non-null object \n", " 4 Album_type 20718 non-null object \n", " 5 Uri 20718 non-null object \n", " 6 Danceability 20716 non-null float64\n", " 7 Energy 20716 non-null float64\n", " 8 Key 20716 non-null float64\n", " 9 Loudness 20716 non-null float64\n", " 10 Speechiness 20716 non-null float64\n", " 11 Acousticness 20716 non-null float64\n", " 12 Instrumentalness 20716 non-null float64\n", " 13 Liveness 20716 non-null float64\n", " 14 Valence 20716 non-null float64\n", " 15 Tempo 20716 non-null float64\n", " 16 Duration_ms 20716 non-null float64\n", " 17 Url_youtube 20248 non-null object \n", " 18 Title 20248 non-null object \n", " 19 Channel 20248 non-null object \n", " 20 Views 20248 non-null float64\n", " 21 Likes 20177 non-null float64\n", " 22 Comments 20149 non-null float64\n", " 23 Description 19842 non-null object \n", " 24 Licensed 20248 non-null object \n", " 25 official_video 20248 non-null object \n", " 26 Stream 20142 non-null float64\n", "dtypes: float64(15), object(12)\n", "memory usage: 4.3+ MB\n" ] } ] }, { "cell_type": "code", "source": [ "df.head()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 625 }, "id": "38v2mQzJDPA5", "outputId": "3e6265cc-f654-4807-a033-e8922e89f5eb" }, "id": "38v2mQzJDPA5", "execution_count": 4, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Artist Url_spotify \\\n", "0 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "1 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "2 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "3 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "4 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "\n", " Track \\\n", "0 Feel Good Inc. \n", "1 Rhinestone Eyes \n", "2 New Gold (feat. Tame Impala and Bootie Brown) \n", "3 On Melancholy Hill \n", "4 Clint Eastwood \n", "\n", " Album Album_type \\\n", "0 Demon Days album \n", "1 Plastic Beach album \n", "2 New Gold (feat. Tame Impala and Bootie Brown) single \n", "3 Plastic Beach album \n", "4 Gorillaz album \n", "\n", " Uri Danceability Energy Key Loudness \\\n", "0 spotify:track:0d28khcov6AiegSCpG5TuT 0.818 0.705 6.0 -6.679 \n", "1 spotify:track:1foMv2HQwfQ2vntFf9HFeG 0.676 0.703 8.0 -5.815 \n", "2 spotify:track:64dLd6rVqDLtkXFYrEUHIU 0.695 0.923 1.0 -3.930 \n", "3 spotify:track:0q6LuUqGLUiCPP1cbdwFs3 0.689 0.739 2.0 -5.810 \n", "4 spotify:track:7yMiX7n9SBvadzox8T5jzT 0.663 0.694 10.0 -8.627 \n", "\n", " Speechiness Acousticness Instrumentalness Liveness Valence Tempo \\\n", "0 0.1770 0.008360 0.002330 0.6130 0.772 138.559 \n", "1 0.0302 0.086900 0.000687 0.0463 0.852 92.761 \n", "2 0.0522 0.042500 0.046900 0.1160 0.551 108.014 \n", "3 0.0260 0.000015 0.509000 0.0640 0.578 120.423 \n", "4 0.1710 0.025300 0.000000 0.0698 0.525 167.953 \n", "\n", " Duration_ms Url_youtube \\\n", "0 222640.0 https://www.youtube.com/watch?v=HyHNuVaZJ-k \n", "1 200173.0 https://www.youtube.com/watch?v=yYDmaexVHic \n", "2 215150.0 https://www.youtube.com/watch?v=qJa-VFwPpYA \n", "3 233867.0 https://www.youtube.com/watch?v=04mfKJWDSzI \n", "4 340920.0 https://www.youtube.com/watch?v=1V_xRb0x9aw \n", "\n", " Title Channel Views \\\n", "0 Gorillaz - Feel Good Inc. (Official Video) Gorillaz 693555221.0 \n", "1 Gorillaz - Rhinestone Eyes [Storyboard Film] (... Gorillaz 72011645.0 \n", "2 Gorillaz - New Gold ft. Tame Impala & Bootie B... Gorillaz 8435055.0 \n", "3 Gorillaz - On Melancholy Hill (Official Video) Gorillaz 211754952.0 \n", "4 Gorillaz - Clint Eastwood (Official Video) Gorillaz 618480958.0 \n", "\n", " Likes Comments Description \\\n", "0 6220896.0 169907.0 Official HD Video for Gorillaz' fantastic trac... \n", "1 1079128.0 31003.0 The official video for Gorillaz - Rhinestone E... \n", "2 282142.0 7399.0 Gorillaz - New Gold ft. Tame Impala & Bootie B... \n", "3 1788577.0 55229.0 Follow Gorillaz online:\\nhttp://gorillaz.com \\... \n", "4 6197318.0 155930.0 The official music video for Gorillaz - Clint ... \n", "\n", " Licensed official_video Stream \n", "0 True True 1.040235e+09 \n", "1 True True 3.100837e+08 \n", "2 True True 6.306347e+07 \n", "3 True True 4.346636e+08 \n", "4 True True 6.172597e+08 " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ArtistUrl_spotifyTrackAlbumAlbum_typeUriDanceabilityEnergyKeyLoudnessSpeechinessAcousticnessInstrumentalnessLivenessValenceTempoDuration_msUrl_youtubeTitleChannelViewsLikesCommentsDescriptionLicensedofficial_videoStream
0Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...Feel Good Inc.Demon Daysalbumspotify:track:0d28khcov6AiegSCpG5TuT0.8180.7056.0-6.6790.17700.0083600.0023300.61300.772138.559222640.0https://www.youtube.com/watch?v=HyHNuVaZJ-kGorillaz - Feel Good Inc. (Official Video)Gorillaz693555221.06220896.0169907.0Official HD Video for Gorillaz' fantastic trac...TrueTrue1.040235e+09
1Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...Rhinestone EyesPlastic Beachalbumspotify:track:1foMv2HQwfQ2vntFf9HFeG0.6760.7038.0-5.8150.03020.0869000.0006870.04630.85292.761200173.0https://www.youtube.com/watch?v=yYDmaexVHicGorillaz - Rhinestone Eyes [Storyboard Film] (...Gorillaz72011645.01079128.031003.0The official video for Gorillaz - Rhinestone E...TrueTrue3.100837e+08
2Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...New Gold (feat. Tame Impala and Bootie Brown)New Gold (feat. Tame Impala and Bootie Brown)singlespotify:track:64dLd6rVqDLtkXFYrEUHIU0.6950.9231.0-3.9300.05220.0425000.0469000.11600.551108.014215150.0https://www.youtube.com/watch?v=qJa-VFwPpYAGorillaz - New Gold ft. Tame Impala & Bootie B...Gorillaz8435055.0282142.07399.0Gorillaz - New Gold ft. Tame Impala & Bootie B...TrueTrue6.306347e+07
3Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...On Melancholy HillPlastic Beachalbumspotify:track:0q6LuUqGLUiCPP1cbdwFs30.6890.7392.0-5.8100.02600.0000150.5090000.06400.578120.423233867.0https://www.youtube.com/watch?v=04mfKJWDSzIGorillaz - On Melancholy Hill (Official Video)Gorillaz211754952.01788577.055229.0Follow Gorillaz online:\\nhttp://gorillaz.com \\...TrueTrue4.346636e+08
4Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...Clint EastwoodGorillazalbumspotify:track:7yMiX7n9SBvadzox8T5jzT0.6630.69410.0-8.6270.17100.0253000.0000000.06980.525167.953340920.0https://www.youtube.com/watch?v=1V_xRb0x9awGorillaz - Clint Eastwood (Official Video)Gorillaz618480958.06197318.0155930.0The official music video for Gorillaz - Clint ...TrueTrue6.172597e+08
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "variable_name": "df" } }, "metadata": {}, "execution_count": 4 } ] }, { "cell_type": "markdown", "source": [ "### 2 Data Cleaning & Preprocessing" ], "metadata": { "id": "Si8ZBjM1D3vH" }, "id": "Si8ZBjM1D3vH" }, { "cell_type": "code", "source": [ "# Drop unused columns\n", "df = df.drop(['Album_type','Uri','Duration_ms'], axis=1)" ], "metadata": { "id": "a-dtSkNED2-e" }, "id": "a-dtSkNED2-e", "execution_count": 4, "outputs": [] }, { "cell_type": "code", "source": [ "# Drop duplicates & missing values\n", "df = df.drop_duplicates()\n", "df = df.dropna()" ], "metadata": { "id": "7O7ih08tEfvX" }, "id": "7O7ih08tEfvX", "execution_count": 5, "outputs": [] }, { "cell_type": "code", "source": [ "import pandas as pd\n", "from sklearn.preprocessing import MinMaxScaler\n", "\n", "def preprocess_song_data(df):\n", " # Drop rows missing essential Spotify audio features or title/artist\n", " required_columns = [\n", " 'Title', 'Artist', 'Valence', 'Energy', 'Danceability',\n", " 'Tempo', 'Acousticness', 'Instrumentalness'\n", " ]\n", " df_clean = df.dropna(subset=required_columns).copy()\n", "\n", " # Normalize YouTube and Spotify popularity metrics\n", " popularity_cols = ['Likes', 'Views', 'Comments', 'Stream']\n", " for col in popularity_cols:\n", " if col in df_clean.columns:\n", " df_clean[col] = df_clean[col].fillna(0)\n", "\n", " scaler = MinMaxScaler()\n", " df_clean[popularity_cols] = scaler.fit_transform(df_clean[popularity_cols])\n", "\n", " # Create an audio feature vector column for similarity search\n", " audio_feature_cols = [\n", " 'Valence', 'Energy', 'Danceability', 'Tempo',\n", " 'Acousticness', 'Instrumentalness'\n", " ]\n", " df_clean['audio_vector'] = df_clean[audio_feature_cols].values.tolist()\n", "\n", " return df_clean, audio_feature_cols, popularity_cols" ], "metadata": { "id": "I4hhV646FeEf" }, "id": "I4hhV646FeEf", "execution_count": 6, "outputs": [] }, { "cell_type": "code", "source": [ "df_clean, audio_feature_cols, popularity_cols = preprocess_song_data(df)" ], "metadata": { "id": "m1_PMSBOFlcb" }, "id": "m1_PMSBOFlcb", "execution_count": 7, "outputs": [] }, { "cell_type": "code", "source": [ "df_clean.head()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 625 }, "id": "onbjo2MmFtAO", "outputId": "81a73a6c-6883-4911-a049-8ecb88853752" }, "id": "onbjo2MmFtAO", "execution_count": 9, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Artist Url_spotify \\\n", "0 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "1 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "2 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "3 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "4 Gorillaz https://open.spotify.com/artist/3AA28KZvwAUcZu... \n", "\n", " Track \\\n", "0 Feel Good Inc. \n", "1 Rhinestone Eyes \n", "2 New Gold (feat. Tame Impala and Bootie Brown) \n", "3 On Melancholy Hill \n", "4 Clint Eastwood \n", "\n", " Album Danceability Energy Key \\\n", "0 Demon Days 0.818 0.705 6.0 \n", "1 Plastic Beach 0.676 0.703 8.0 \n", "2 New Gold (feat. Tame Impala and Bootie Brown) 0.695 0.923 1.0 \n", "3 Plastic Beach 0.689 0.739 2.0 \n", "4 Gorillaz 0.663 0.694 10.0 \n", "\n", " Loudness Speechiness Acousticness Instrumentalness Liveness Valence \\\n", "0 -6.679 0.1770 0.008360 0.002330 0.6130 0.772 \n", "1 -5.815 0.0302 0.086900 0.000687 0.0463 0.852 \n", "2 -3.930 0.0522 0.042500 0.046900 0.1160 0.551 \n", "3 -5.810 0.0260 0.000015 0.509000 0.0640 0.578 \n", "4 -8.627 0.1710 0.025300 0.000000 0.0698 0.525 \n", "\n", " Tempo Url_youtube \\\n", "0 138.559 https://www.youtube.com/watch?v=HyHNuVaZJ-k \n", "1 92.761 https://www.youtube.com/watch?v=yYDmaexVHic \n", "2 108.014 https://www.youtube.com/watch?v=qJa-VFwPpYA \n", "3 120.423 https://www.youtube.com/watch?v=04mfKJWDSzI \n", "4 167.953 https://www.youtube.com/watch?v=1V_xRb0x9aw \n", "\n", " Title Channel Views \\\n", "0 Gorillaz - Feel Good Inc. (Official Video) Gorillaz 0.085840 \n", "1 Gorillaz - Rhinestone Eyes [Storyboard Film] (... Gorillaz 0.008913 \n", "2 Gorillaz - New Gold ft. Tame Impala & Bootie B... Gorillaz 0.001044 \n", "3 Gorillaz - On Melancholy Hill (Official Video) Gorillaz 0.026208 \n", "4 Gorillaz - Clint Eastwood (Official Video) Gorillaz 0.076548 \n", "\n", " Likes Comments Description \\\n", "0 0.122486 0.010564 Official HD Video for Gorillaz' fantastic trac... \n", "1 0.021247 0.001928 The official video for Gorillaz - Rhinestone E... \n", "2 0.005555 0.000460 Gorillaz - New Gold ft. Tame Impala & Bootie B... \n", "3 0.035216 0.003434 Follow Gorillaz online:\\nhttp://gorillaz.com \\... \n", "4 0.122022 0.009695 The official music video for Gorillaz - Clint ... \n", "\n", " Licensed official_video Stream \\\n", "0 True True 0.307168 \n", "1 True True 0.091562 \n", "2 True True 0.018620 \n", "3 True True 0.128349 \n", "4 True True 0.182268 \n", "\n", " audio_vector \n", "0 [0.772, 0.705, 0.818, 138.559, 0.00836, 0.00233] \n", "1 [0.852, 0.703, 0.676, 92.761, 0.0869, 0.000687] \n", "2 [0.551, 0.923, 0.695, 108.014, 0.0425, 0.0469] \n", "3 [0.578, 0.739, 0.689, 120.423, 1.51e-05, 0.509] \n", "4 [0.525, 0.694, 0.663, 167.953, 0.0253, 0.0] " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ArtistUrl_spotifyTrackAlbumDanceabilityEnergyKeyLoudnessSpeechinessAcousticnessInstrumentalnessLivenessValenceTempoUrl_youtubeTitleChannelViewsLikesCommentsDescriptionLicensedofficial_videoStreamaudio_vector
0Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...Feel Good Inc.Demon Days0.8180.7056.0-6.6790.17700.0083600.0023300.61300.772138.559https://www.youtube.com/watch?v=HyHNuVaZJ-kGorillaz - Feel Good Inc. (Official Video)Gorillaz0.0858400.1224860.010564Official HD Video for Gorillaz' fantastic trac...TrueTrue0.307168[0.772, 0.705, 0.818, 138.559, 0.00836, 0.00233]
1Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...Rhinestone EyesPlastic Beach0.6760.7038.0-5.8150.03020.0869000.0006870.04630.85292.761https://www.youtube.com/watch?v=yYDmaexVHicGorillaz - Rhinestone Eyes [Storyboard Film] (...Gorillaz0.0089130.0212470.001928The official video for Gorillaz - Rhinestone E...TrueTrue0.091562[0.852, 0.703, 0.676, 92.761, 0.0869, 0.000687]
2Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...New Gold (feat. Tame Impala and Bootie Brown)New Gold (feat. Tame Impala and Bootie Brown)0.6950.9231.0-3.9300.05220.0425000.0469000.11600.551108.014https://www.youtube.com/watch?v=qJa-VFwPpYAGorillaz - New Gold ft. Tame Impala & Bootie B...Gorillaz0.0010440.0055550.000460Gorillaz - New Gold ft. Tame Impala & Bootie B...TrueTrue0.018620[0.551, 0.923, 0.695, 108.014, 0.0425, 0.0469]
3Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...On Melancholy HillPlastic Beach0.6890.7392.0-5.8100.02600.0000150.5090000.06400.578120.423https://www.youtube.com/watch?v=04mfKJWDSzIGorillaz - On Melancholy Hill (Official Video)Gorillaz0.0262080.0352160.003434Follow Gorillaz online:\\nhttp://gorillaz.com \\...TrueTrue0.128349[0.578, 0.739, 0.689, 120.423, 1.51e-05, 0.509]
4Gorillazhttps://open.spotify.com/artist/3AA28KZvwAUcZu...Clint EastwoodGorillaz0.6630.69410.0-8.6270.17100.0253000.0000000.06980.525167.953https://www.youtube.com/watch?v=1V_xRb0x9awGorillaz - Clint Eastwood (Official Video)Gorillaz0.0765480.1220220.009695The official music video for Gorillaz - Clint ...TrueTrue0.182268[0.525, 0.694, 0.663, 167.953, 0.0253, 0.0]
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "variable_name": "df_clean" } }, "metadata": {}, "execution_count": 9 } ] }, { "cell_type": "code", "source": [ "df_clean = df_clean.head()" ], "metadata": { "id": "XfyPDoE1b95L" }, "id": "XfyPDoE1b95L", "execution_count": 11, "outputs": [] }, { "cell_type": "markdown", "source": [ "### 3 Build model" ], "metadata": { "id": "_HloxOGUXNp1" }, "id": "_HloxOGUXNp1" }, { "cell_type": "code", "source": [ "# !pip install langchain faiss-cpu gradio\n", "# !pip install -U langchain langchain-community\n", "# !pip install sentence-transformers transformers\n", "!pip install transformers accelerate langchain" ], "metadata": { "collapsed": true, "id": "xJtYzjNLXP-V" }, "id": "xJtYzjNLXP-V", "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "!pip install -U langchain langchain-community" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "collapsed": true, "id": "3bReg9vXXjl9", "outputId": "42c353e4-d055-4423-83f8-f4ca4c68ccfc" }, "id": "3bReg9vXXjl9", "execution_count": 9, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: langchain in /usr/local/lib/python3.11/dist-packages (0.3.21)\n", "Collecting langchain-community\n", " Downloading langchain_community-0.3.20-py3-none-any.whl.metadata (2.4 kB)\n", "Requirement already satisfied: langchain-core<1.0.0,>=0.3.45 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.47)\n", "Requirement already satisfied: langchain-text-splitters<1.0.0,>=0.3.7 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.7)\n", "Requirement already satisfied: langsmith<0.4,>=0.1.17 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.18)\n", "Requirement already satisfied: pydantic<3.0.0,>=2.7.4 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.10.6)\n", "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.0.39)\n", "Requirement already satisfied: requests<3,>=2 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.32.3)\n", "Requirement already satisfied: PyYAML>=5.3 in /usr/local/lib/python3.11/dist-packages (from langchain) (6.0.2)\n", "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /usr/local/lib/python3.11/dist-packages (from langchain-community) (3.11.14)\n", "Requirement already satisfied: tenacity!=8.4.0,<10,>=8.1.0 in /usr/local/lib/python3.11/dist-packages (from langchain-community) (9.0.0)\n", "Collecting dataclasses-json<0.7,>=0.5.7 (from langchain-community)\n", " Downloading dataclasses_json-0.6.7-py3-none-any.whl.metadata (25 kB)\n", "Collecting pydantic-settings<3.0.0,>=2.4.0 (from langchain-community)\n", " Downloading pydantic_settings-2.8.1-py3-none-any.whl.metadata (3.5 kB)\n", "Collecting httpx-sse<1.0.0,>=0.4.0 (from langchain-community)\n", " Downloading httpx_sse-0.4.0-py3-none-any.whl.metadata (9.0 kB)\n", "Requirement already satisfied: numpy<3,>=1.26.2 in /usr/local/lib/python3.11/dist-packages (from langchain-community) (2.0.2)\n", "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain-community) (2.6.1)\n", "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain-community) (1.3.2)\n", "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain-community) (25.3.0)\n", "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain-community) (1.5.0)\n", "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain-community) (6.2.0)\n", "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain-community) (0.3.0)\n", "Requirement already satisfied: yarl<2.0,>=1.17.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain-community) (1.18.3)\n", "Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.7,>=0.5.7->langchain-community)\n", " Downloading marshmallow-3.26.1-py3-none-any.whl.metadata (7.3 kB)\n", "Collecting typing-inspect<1,>=0.4.0 (from dataclasses-json<0.7,>=0.5.7->langchain-community)\n", " Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)\n", "Requirement already satisfied: jsonpatch<2.0,>=1.33 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.45->langchain) (1.33)\n", "Requirement already satisfied: packaging<25,>=23.2 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.45->langchain) (24.2)\n", "Requirement already satisfied: typing-extensions>=4.7 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.45->langchain) (4.12.2)\n", "Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (0.28.1)\n", "Requirement already satisfied: orjson<4.0.0,>=3.9.14 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (3.10.15)\n", "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (1.0.0)\n", "Requirement already satisfied: zstandard<0.24.0,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (0.23.0)\n", "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain) (0.7.0)\n", "Requirement already satisfied: pydantic-core==2.27.2 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain) (2.27.2)\n", "Collecting python-dotenv>=0.21.0 (from pydantic-settings<3.0.0,>=2.4.0->langchain-community)\n", " Downloading python_dotenv-1.1.0-py3-none-any.whl.metadata (24 kB)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (3.4.1)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (3.10)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (2.3.0)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (2025.1.31)\n", "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.11/dist-packages (from SQLAlchemy<3,>=1.4->langchain) (3.1.1)\n", "Requirement already satisfied: anyio in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (4.9.0)\n", "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (1.0.7)\n", "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (0.14.0)\n", "Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.11/dist-packages (from jsonpatch<2.0,>=1.33->langchain-core<1.0.0,>=0.3.45->langchain) (3.0.0)\n", "Collecting mypy-extensions>=0.3.0 (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain-community)\n", " Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)\n", "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.11/dist-packages (from anyio->httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (1.3.1)\n", "Downloading langchain_community-0.3.20-py3-none-any.whl (2.5 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.5/2.5 MB\u001b[0m \u001b[31m42.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading dataclasses_json-0.6.7-py3-none-any.whl (28 kB)\n", "Downloading httpx_sse-0.4.0-py3-none-any.whl (7.8 kB)\n", "Downloading pydantic_settings-2.8.1-py3-none-any.whl (30 kB)\n", "Downloading marshmallow-3.26.1-py3-none-any.whl (50 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.9/50.9 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading python_dotenv-1.1.0-py3-none-any.whl (20 kB)\n", "Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n", "Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n", "Installing collected packages: python-dotenv, mypy-extensions, marshmallow, httpx-sse, typing-inspect, pydantic-settings, dataclasses-json, langchain-community\n", "Successfully installed dataclasses-json-0.6.7 httpx-sse-0.4.0 langchain-community-0.3.20 marshmallow-3.26.1 mypy-extensions-1.0.0 pydantic-settings-2.8.1 python-dotenv-1.1.0 typing-inspect-0.9.0\n" ] } ] }, { "cell_type": "code", "source": [ "from huggingface_hub import login\n", "login()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 17, "referenced_widgets": [ "42c6c5c7d8d747f0acc5cef2b85f3b8d", "b3878fa00e234dffa1a1a920bdb376f6", "2c3ae2b811c2400c89b0c1d98f4b96ce", "485559c2895549dfbc009e9c5befa2dc", "c7223e2ba0e8443fab0958026a3b6568", "871962fe50e1448c868965ebccbd2360", "404a1d3030454d3e84fe6420ebb80091", "e2a20c52c7a24de6ab0117167e9220d2", "95df421aa38e461d900c2fe880f1cd73", "ac3a8af614424efdb8a5994663fd24b8", "a590f9b58bf54673af957562407c5bfd", "988d16d7f27d4c2996dfa245258d5800", "1c2663b8a97a419e942934296ca37259", "91c2e50591c347c9a47cfa093402804e", "912b233308ac403081e9f0f87baeb4bb", "2bed17aef8ba4c72a99581b8e3140ef3", "2e27c2dbc08444618aa3628a818538a7", "6cd05989fbe947b085189c9300261ff0", "25ab7d781a0a4391b67c9eb04f29394a", "4353881fa6004c4cbd23ccc01e3f70e2" ] }, "id": "mtuz93B4XgqN", "outputId": "e5721272-7aca-455c-9e18-5a0a1d81d6e9" }, "id": "mtuz93B4XgqN", "execution_count": 10, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "VBox(children=(HTML(value='
:24: LangChainDeprecationWarning: The class `HuggingFacePipeline` was deprecated in LangChain 0.0.37 and will be removed in 1.0. An updated version of the class exists in the :class:`~langchain-huggingface package and should be used instead. To use it run `pip install -U :class:`~langchain-huggingface` and import as `from :class:`~langchain_huggingface import HuggingFacePipeline``.\n", " llm = HuggingFacePipeline(pipeline=hf_pipeline)\n" ] } ] }, { "cell_type": "code", "source": [ "import re, json\n", "\n", "def parse_user_input(user_input):\n", " prompt = f\"\"\"\n", "You are an expert music assistant trained to recommend songs for use in creative projects like ads, short films, social media videos, and campaigns.\n", "\n", "Your job is to extract structured information from the user's input so that we can recommend songs from our database based on Spotify audio features and YouTube metadata.\n", "\n", "Only return the following fields in JSON format:\n", "- \"mood\": overall emotion (e.g., sad, happy, dramatic)\n", "- \"context\": what kind of scene or use (e.g., wedding, breakup scene, brand ad)\n", "- \"preference\": how to sort (e.g., likes, views, popularity)\n", "- \"reference_song\": name of a song the user wants similar songs to\n", "- \"genre\": intended musical style (e.g., acoustic, pop, ambient)\n", "- \"instrumental\": 'yes' if vocals aren't needed, otherwise 'no'\n", "- \"tempo\": slow / medium / fast\n", "- \"artist\": if they want something from a specific artist\n", "- \"gender\": if they prefer male / female vocal\n", "- \"limit\": how many results to show (as a number)\n", "\n", "{{\n", " \"mood\": \"...\",\n", " \"context\": \"...\",\n", " \"preference\": \"...\",\n", " \"reference_song\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"...\",\n", " \"limit\": \"...\"\n", "}}\n", "\n", "User input: \"{user_input}\"\n", "\n", "Respond ONLY with the JSON. Do not explain anything.\n", "\"\"\"\n", " output = llm(prompt)\n", " print(\"🧠 Raw LLM Output:\\n\", output)\n", "\n", " try:\n", " json_blocks = re.findall(r\"\\{[\\s\\S]*?\\}\", output)\n", " json_str = json_blocks[-1] if json_blocks else \"{}\"\n", " parsed = json.loads(json_str)\n", "\n", " # Ensure limit is str of int\n", " try:\n", " parsed[\"limit\"] = str(int(parsed[\"limit\"]))\n", " except:\n", " parsed[\"limit\"] = \"5\"\n", "\n", " # Fill any missing keys\n", " expected_keys = [\"mood\", \"context\", \"preference\", \"reference_song\", \"genre\", \"instrumental\", \"tempo\", \"artist\", \"gender\", \"limit\"]\n", " for key in expected_keys:\n", " if key not in parsed:\n", " parsed[key] = \"\" if key != \"limit\" else \"5\"\n", "\n", " except Exception as e:\n", " print(\"❌ JSON parsing failed:\", e)\n", " parsed = {key: \"\" for key in expected_keys}\n", " parsed[\"limit\"] = \"5\"\n", "\n", " return parsed\n" ], "metadata": { "id": "eGdvxqBe2R60" }, "id": "eGdvxqBe2R60", "execution_count": 13, "outputs": [] }, { "cell_type": "code", "source": [ "def mood_to_valence_range(mood):\n", " mood = mood.strip().lower()\n", " mood_map = {\n", " \"sad\": (0.0, 0.3),\n", " \"melancholy\": (0.2, 0.4),\n", " \"emotional\": (0.3, 0.5),\n", " \"chill\": (0.4, 0.6),\n", " \"nostalgic\": (0.3, 0.5),\n", " \"neutral\": (0.4, 0.6),\n", " \"hopeful\": (0.5, 0.7),\n", " \"happy\": (0.6, 0.85),\n", " \"cheerful\": (0.7, 0.9),\n", " \"upbeat\": (0.7, 1.0),\n", " \"energetic\": (0.8, 1.0),\n", " \"romantic\": (0.4, 0.7),\n", " \"heartbreak\": (0.1, 0.3),\n", " \"dark\": (0.0, 0.2),\n", " \"dramatic\": (0.3, 0.5),\n", " \"angry\": (0.0, 0.3),\n", " \"inspiring\": (0.6, 0.85),\n", " \"relaxing\": (0.4, 0.6),\n", " \"peaceful\": (0.3, 0.5),\n", " \"epic\": (0.5, 0.8)\n", " }\n", "\n", " # fallback: no filter\n", " return mood_map.get(mood, (0.0, 1.0))" ], "metadata": { "id": "f08LGey22WIN" }, "id": "f08LGey22WIN", "execution_count": 14, "outputs": [] }, { "cell_type": "code", "source": [ "!pip install gender-guesser" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "HOTWyF693Lwu", "outputId": "810847a1-53f7-4778-ebc0-9e128cdf64af" }, "id": "HOTWyF693Lwu", "execution_count": 15, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Collecting gender-guesser\n", " Downloading gender_guesser-0.4.0-py2.py3-none-any.whl.metadata (3.0 kB)\n", "Downloading gender_guesser-0.4.0-py2.py3-none-any.whl (379 kB)\n", "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/379.3 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m379.3/379.3 kB\u001b[0m \u001b[31m19.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hInstalling collected packages: gender-guesser\n", "Successfully installed gender-guesser-0.4.0\n" ] } ] }, { "cell_type": "code", "source": [ "import gender_guesser.detector as gender\n", "gender_detector = gender.Detector()" ], "metadata": { "id": "NRNuk-Ud_C0p" }, "id": "NRNuk-Ud_C0p", "execution_count": 16, "outputs": [] }, { "cell_type": "code", "source": [ "def infer_gender(artist_name):\n", " try:\n", " first_name = artist_name.split()[0]\n", " guess = gender_detector.get_gender(first_name)\n", " if \"female\" in guess: return \"female\"\n", " if \"male\" in guess: return \"male\"\n", " return \"unknown\"\n", " except:\n", " return \"unknown\"" ], "metadata": { "id": "og6ERmyh_LRP" }, "id": "og6ERmyh_LRP", "execution_count": 17, "outputs": [] }, { "cell_type": "code", "source": [ "df_clean[\"Gender\"] = df_clean[\"Artist\"].apply(infer_gender)" ], "metadata": { "id": "bUAo_82F_E5P" }, "id": "bUAo_82F_E5P", "execution_count": 18, "outputs": [] }, { "cell_type": "code", "source": [ "genre_filters = {\n", " \"pop\": lambda df: (df[\"Danceability\"] > 0.6) & (df[\"Energy\"] > 0.5) & (df[\"Acousticness\"] < 0.5),\n", " \"rock\": lambda df: (df[\"Energy\"] > 0.75) & (df[\"Acousticness\"] < 0.4),\n", " \"jazz\": lambda df: (df[\"Acousticness\"] > 0.6) & (df[\"Instrumentalness\"] > 0.5) & (df[\"Energy\"] < 0.6),\n", " \"rnb\": lambda df: (df[\"Danceability\"] > 0.6) & (df[\"Speechiness\"] < 0.33) & (df[\"Acousticness\"] > 0.3),\n", " \"acoustic\": lambda df: df[\"Acousticness\"] > 0.8,\n", " \"hip hop\": lambda df: (df[\"Speechiness\"] > 0.4) & (df[\"Danceability\"] > 0.6),\n", " \"edm\": lambda df: (df[\"Danceability\"] > 0.7) & (df[\"Energy\"] > 0.7) & (df[\"Acousticness\"] < 0.3),\n", " \"indie\": lambda df: (df[\"Acousticness\"] > 0.4) & (df[\"Energy\"] < 0.6),\n", " \"dangdut\": lambda df: (df[\"Danceability\"] > 0.6) & (df[\"Speechiness\"] < 0.4) & (df[\"Acousticness\"] > 0.4) & (df[\"Tempo\"].between(70, 130)),\n", " \"keroncong\": lambda df: (df[\"Acousticness\"] > 0.8) & (df[\"Energy\"] < 0.5) & (df[\"Instrumentalness\"] > 0.3),\n", "}\n" ], "metadata": { "id": "6-WI6621Bc4a" }, "id": "6-WI6621Bc4a", "execution_count": 19, "outputs": [] }, { "cell_type": "code", "source": [ "def recommend_from_dataframe(parsed, df_clean, randomize = False):\n", " df_filtered = df_clean.copy()\n", " filters_applied = set()\n", " top_n = int(parsed[\"limit\"])\n", " sort_col = parsed.get(\"preference\", \"Likes\") or \"Likes\"\n", " if sort_col not in df_clean.columns:\n", " sort_col = \"Likes\"\n", "\n", " print(\"🎵 Total songs before filtering:\", len(df_filtered))\n", "\n", " # Mood → valence\n", " val_min, val_max = mood_to_valence_range(parsed[\"mood\"])\n", " df_filtered = df_filtered[(df_filtered[\"Valence\"] >= val_min) & (df_filtered[\"Valence\"] <= val_max)]\n", " filters_applied.add(\"Valence\")\n", " print(\"🎯 Applied mood → Valence filter:\", len(df_filtered))\n", "\n", " # Genre\n", " genre = parsed[\"genre\"].strip().lower()\n", " if genre not in [\"\", \"...\", \"none\", \"n/a\",\"null\",\"unknown\"] and genre in genre_filters and not {\"Acousticness\", \"Energy\", \"Instrumentalness\", \"Speechiness\", \"Tempo\"} & filters_applied:\n", " try:\n", " genre_mask = genre_filters[genre](df_filtered)\n", " df_filtered = df_filtered[genre_mask]\n", " filters_applied.update(genre_filters[genre].__code__.co_names)\n", " print(f\"🎯 Applied genre filter for '{genre}':\", len(df_filtered))\n", " except Exception as e:\n", " print(f\"⚠️ Failed to apply genre filter for '{genre}':\", e)\n", " else:\n", " print(\"⚠️ Skipped genre filter due to value or overlap.\")\n", "\n", " # Instrumental\n", " instrumental = parsed[\"instrumental\"].strip().lower()\n", " if instrumental == \"yes\" and \"Instrumentalness\" not in filters_applied:\n", " df_filtered = df_filtered[df_filtered[\"Instrumentalness\"] > 0.000002]\n", " filters_applied.add(\"Instrumentalness\")\n", " print(\"🎯 Applied instrumental filter:\", len(df_filtered))\n", " else:\n", " print(\"⚠️ Skipped instrumental filter (empty or overlap)\")\n", "\n", " # Tempo\n", " tempo = parsed[\"tempo\"].strip().lower()\n", " if tempo not in [\"\", \"...\", \"none\", \"n/a\",\"null\",\"unknown\"] and \"Tempo\" not in filters_applied:\n", " if tempo == \"fast\":\n", " df_filtered = df_filtered[df_filtered[\"Tempo\"] > 120]\n", " elif tempo == \"slow\":\n", " df_filtered = df_filtered[df_filtered[\"Tempo\"] < 90]\n", " elif tempo == \"medium\":\n", " df_filtered = df_filtered[(df_filtered[\"Tempo\"] >= 90) & (df_filtered[\"Tempo\"] <= 120)]\n", " filters_applied.add(\"Tempo\")\n", " print(\"🎯 Applied tempo filter:\", len(df_filtered))\n", " else:\n", " print(\"⚠️ Skipped tempo filter (empty or overlap)\")\n", "\n", " # Gender\n", " gender = parsed[\"gender\"].strip().lower()\n", " if gender not in [\"\", \"...\", \"none\", \"n/a\",\"null\"]:\n", " if \"Gender\" in df_filtered.columns:\n", " df_filtered = df_filtered[df_filtered[\"Gender\"].str.lower() == gender]\n", " filters_applied.add(\"Gender\")\n", " print(\"🎯 Applied gender filter:\", len(df_filtered))\n", " else:\n", " print(\"⚠️ Gender column not found — skipping.\")\n", "\n", " if randomize:\n", " df_sorted = df_filtered.sample(frac=1).head(top_n)\n", " else:\n", " df_sorted = df_filtered.sort_values(by=sort_col, ascending=False).head(top_n)\n", "\n", " print(\"✅ Final songs returned:\", len(df_sorted))\n", " return df_sorted" ], "metadata": { "id": "gKN3KKOc2Y5a" }, "id": "gKN3KKOc2Y5a", "execution_count": 20, "outputs": [] }, { "cell_type": "code", "source": [ "from langchain.prompts import PromptTemplate\n", "\n", "reference_song_prompt = PromptTemplate.from_template(\"\"\"\n", "You are a music expert. A user has requested songs similar to a reference song that may not exist in our database.\n", "\n", "Your job is to describe the following audio features of the reference song as accurately as possible, based on your knowledge:\n", "\n", "- mood (e.g. sad, energetic, chill)\n", "- genre (e.g. pop, acoustic, EDM)\n", "- instrumental (yes/no)\n", "- tempo (slow, medium, fast)\n", "- artist (who performed the song)\n", "- gender (male, female, group, unknown)\n", "\n", "Respond ONLY in the following JSON format:\n", "{\n", " \"mood\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"...\"\n", "}\n", "\n", "Reference song: \"{reference_song}\"\n", "\n", "Return only the JSON. Do not include any other explanation.\n", "\"\"\")" ], "metadata": { "id": "OtzGSjKhETDD" }, "id": "OtzGSjKhETDD", "execution_count": 21, "outputs": [] }, { "cell_type": "code", "source": [ "import re\n", "import json\n", "\n", "def recommend_by_reference_song(parsed, df_clean, audio_feature_cols, llm, reference_song_prompt):\n", " reference_title = parsed[\"reference_song\"].strip().lower()\n", " top_n = int(parsed.get(\"limit\", 5))\n", " sort_col = parsed.get(\"preference\", \"Likes\") or \"Likes\"\n", " if sort_col not in df_clean.columns:\n", " sort_col = \"Likes\"\n", "\n", " # 🧠 Try to find exact or partial match in catalog\n", " matches = df_clean[df_clean[\"Title\"].str.lower().str.contains(reference_title, na=False)]\n", "\n", " if not matches.empty:\n", " print(\"✅ Reference song found in catalog — using similarity-based recommendation.\")\n", "\n", " from sklearn.metrics.pairwise import cosine_similarity\n", " import numpy as np\n", "\n", " ref_vec = np.array(matches[audio_feature_cols].values[0]).reshape(1, -1)\n", " all_vecs = np.array(df_clean[audio_feature_cols])\n", " sims = cosine_similarity(ref_vec, all_vecs)[0]\n", "\n", " df_clean[\"similarity\"] = sims\n", " results = df_clean[df_clean[\"Title\"].str.lower() != reference_title]\n", " return results.sort_values(\"similarity\", ascending=False).head(top_n)\n", "\n", " else:\n", " print(\"🧠 Reference song NOT in catalog — asking LLM to describe its features.\")\n", "\n", " prompt = reference_song_prompt.format(reference_song=parsed[\"reference_song\"])\n", " llm_output = llm(prompt)\n", " print(\"🔍 LLM Output:\", llm_output)\n", "\n", " # Try parsing the output\n", " try:\n", " json_str = re.search(r\"\\{[\\s\\S]*?\\}\", llm_output).group()\n", " ref_features = json.loads(json_str)\n", " except:\n", " print(\"⚠️ Failed to parse LLM output. Using fallback.\")\n", " ref_features = {\n", " \"mood\": \"\", \"genre\": \"\", \"instrumental\": \"\", \"tempo\": \"\",\n", " \"artist\": \"\", \"gender\": \"\", \"limit\": parsed.get(\"limit\", \"5\")\n", " }\n", "\n", " # Force keys into recommendation format\n", " ref_features[\"limit\"] = parsed.get(\"limit\", \"5\")\n", " ref_features[\"preference\"] = parsed.get(\"preference\", \"Likes\")\n", "\n", " print(\"🎯 Parsed features from reference song:\", ref_features)\n", "\n", " return recommend_from_dataframe(ref_features, df_clean)" ], "metadata": { "id": "mTNZ-3mx2b9F" }, "id": "mTNZ-3mx2b9F", "execution_count": 22, "outputs": [] }, { "cell_type": "code", "source": [ "def extract_explanation(text):\n", " split_text = text.split(\"Write a 2-sentence explanation.\")\n", " return split_text[1].strip() if len(split_text) > 1 else text.strip()\n", "\n", "def generate_explanation(user_input, song_row):\n", " prompt = f\"\"\"\n", "User asked: \"{user_input}\"\n", "Why is this song a good fit?\n", "\n", "- Title: {song_row['Title']}\n", "- Artist: {song_row['Artist']}\n", "- Valence: {song_row['Valence']}\n", "- Tempo: {song_row['Tempo']}\n", "- Instrumentalness: {song_row['Instrumentalness']}\n", "- Description: {song_row.get('Description', '')}\n", "\n", "Write a 2-sentence explanation.\n", "\"\"\"\n", " raw = llm(prompt)\n", "\n", " # If raw is a string (not a list), return it directly\n", " if isinstance(raw, str):\n", " return extract_explanation(raw)\n", "\n", " # If raw is a list of dicts (like HF pipeline), extract .generated_text\n", " if isinstance(raw, list) and \"generated_text\" in raw[0]:\n", " return extract_explanation(raw[0][\"generated_text\"])\n", "\n", " # Default fallback\n", " return str(raw)" ], "metadata": { "id": "mbSHfUCP2e7v" }, "id": "mbSHfUCP2e7v", "execution_count": 23, "outputs": [] }, { "cell_type": "markdown", "source": [ "#### 3.1 Testing corner" ], "metadata": { "id": "BAS7vELavO19" }, "id": "BAS7vELavO19" }, { "cell_type": "code", "source": [ "user_input = input(\"What kind of song are you looking for? \")\n", "parsed = parse_user_input(user_input)\n", "\n", "if parsed[\"reference_song\"].strip().lower() not in [\"\", \"...\", \"none\", \"n/a\",\"null\",\"unknown\"]:\n", " results = recommend_by_reference_song(\n", " parsed,\n", " df_clean,\n", " audio_feature_cols,\n", " llm,\n", " reference_song_prompt\n", " )\n", "else:\n", " results = recommend_from_dataframe(parsed, df_clean, randomize=False)\n", "\n", "# Show results\n", "if results.empty:\n", " print(\"⚠️ No matching songs found.\")\n", "else:\n", " from IPython.display import display\n", " display(results)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "-ngeKxTx2hk9", "outputId": "de3b86a4-49f9-45f7-b123-c7104c4507f5" }, "id": "-ngeKxTx2hk9", "execution_count": 24, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "What kind of song are you looking for? give me song for infant formula ads using female vocal\n" ] }, { "output_type": "stream", "name": "stderr", "text": [ ":38: LangChainDeprecationWarning: The method `BaseLLM.__call__` was deprecated in langchain-core 0.1.7 and will be removed in 1.0. Use :meth:`~invoke` instead.\n", " output = llm(prompt)\n" ] }, { "output_type": "stream", "name": "stdout", "text": [ "🧠 Raw LLM Output:\n", " \n", "You are an expert music assistant trained to recommend songs for use in creative projects like ads, short films, social media videos, and campaigns.\n", "\n", "Your job is to extract structured information from the user's input so that we can recommend songs from our database based on Spotify audio features and YouTube metadata.\n", "\n", "Only return the following fields in JSON format:\n", "- \"mood\": overall emotion (e.g., sad, happy, dramatic)\n", "- \"context\": what kind of scene or use (e.g., wedding, breakup scene, brand ad)\n", "- \"preference\": how to sort (e.g., likes, views, popularity)\n", "- \"reference_song\": name of a song the user wants similar songs to\n", "- \"genre\": intended musical style (e.g., acoustic, pop, ambient)\n", "- \"instrumental\": 'yes' if vocals aren't needed, otherwise 'no'\n", "- \"tempo\": slow / medium / fast\n", "- \"artist\": if they want something from a specific artist\n", "- \"gender\": if they prefer male / female vocal\n", "- \"limit\": how many results to show (as a number)\n", "\n", "{\n", " \"mood\": \"...\",\n", " \"context\": \"...\",\n", " \"preference\": \"...\",\n", " \"reference_song\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"...\",\n", " \"limit\": \"...\"\n", "}\n", "\n", "User input: \"give me song for infant formula ads using female vocal\"\n", "\n", "Respond ONLY with the JSON. Do not explain anything.\n", "\n", "{\n", " \"mood\": \"happy\",\n", " \"context\": \"infant formula ads\",\n", " \"preference\": \"views\",\n", " \"reference_song\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"female\",\n", " \"limit\": \"5\"\n", "}\n", "🎵 Total songs before filtering: 19170\n", "🎯 Applied mood → Valence filter: 5871\n", "⚠️ Skipped genre filter due to value or overlap.\n", "⚠️ Skipped instrumental filter (empty or overlap)\n", "⚠️ Skipped tempo filter (empty or overlap)\n", "🎯 Applied gender filter: 938\n", "✅ Final songs returned: 5\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ " Artist Url_spotify \\\n", "154 Shakira https://open.spotify.com/artist/0EmeFodog0BfCg... \n", "18046 Camila Cabello https://open.spotify.com/artist/4nDoRrQiYLoBzw... \n", "13526 Selena Gomez https://open.spotify.com/artist/0C8ZW7ezQVs4UR... \n", "13919 Kimbra https://open.spotify.com/artist/6hk7Yq1DU9QcCC... \n", "19637 Lil Nas X https://open.spotify.com/artist/7jVv8c5Fj3E9Vh... \n", "\n", " Track \\\n", "154 Waka Waka (This Time for Africa) [The Official... \n", "18046 Señorita \n", "13526 Taki Taki (with Selena Gomez, Ozuna & Cardi B) \n", "13919 Somebody That I Used To Know \n", "19637 Old Town Road - Remix \n", "\n", " Album Danceability \\\n", "154 Listen Up! The Official 2010 FIFA World Cup Album 0.758 \n", "18046 Shawn Mendes (Deluxe) 0.759 \n", "13526 Taki Taki (with Selena Gomez, Ozuna & Cardi B) 0.842 \n", "13919 Making Mirrors 0.864 \n", "19637 7 EP 0.878 \n", "\n", " Energy Key Loudness Speechiness Acousticness Instrumentalness \\\n", "154 0.871 2.0 -6.408 0.147 0.0062 0.000000 \n", "18046 0.548 9.0 -6.049 0.029 0.0392 0.000000 \n", "13526 0.801 8.0 -4.167 0.228 0.1570 0.000005 \n", "13919 0.495 0.0 -7.036 0.037 0.5910 0.000133 \n", "19637 0.619 6.0 -5.560 0.102 0.0533 0.000000 \n", "\n", " Liveness Valence Tempo \\\n", "154 0.0663 0.753 126.994 \n", "18046 0.0828 0.749 116.967 \n", "13526 0.0642 0.617 95.881 \n", "13919 0.0992 0.720 129.062 \n", "19637 0.1130 0.639 136.041 \n", "\n", " Url_youtube \\\n", "154 https://www.youtube.com/watch?v=pRpeEdMmmQ0 \n", "18046 https://www.youtube.com/watch?v=Pkh8UtuejGw \n", "13526 https://www.youtube.com/watch?v=ixkoVwKQaJg \n", "13919 https://www.youtube.com/watch?v=8UVNT4wvIGY \n", "19637 https://www.youtube.com/watch?v=r7qovpFAGrQ \n", "\n", " Title Channel \\\n", "154 Shakira - Waka Waka (This Time for Africa) (Th... shakiraVEVO \n", "18046 Shawn Mendes, Camila Cabello - Señorita (Offic... ShawnMendesVEVO \n", "13526 DJ Snake - Taki Taki ft. Selena Gomez, Ozuna, ... DJSnakeVEVO \n", "13919 Gotye - Somebody That I Used To Know (feat. Ki... gotyemusic \n", "19637 Lil Nas X - Old Town Road (Official Video) ft.... LilNasXVEVO \n", "\n", " Views Likes Comments \\\n", "154 0.428709 0.400245 0.079806 \n", "18046 0.184123 0.390759 0.039813 \n", "13526 0.298800 0.369689 0.034382 \n", "13919 0.254617 0.287086 0.049306 \n", "19637 0.132348 0.235133 0.013437 \n", "\n", " Description Licensed \\\n", "154 Watch the official music video for \"Waka Waka ... True \n", "18046 Señorita: https://Senorita.lnk.to/OutNow \\n\\nC... True \n", "13526 Stream and download Taki Taki - https://djsnak... True \n", "13919 The official music video for “Somebody That I ... True \n", "19637 Week 17 version of Lil Nas X’s Billboard #1 hi... True \n", "\n", " official_video Stream \\\n", "154 True 0.186006 \n", "18046 True 0.689858 \n", "13526 True 0.407427 \n", "13919 True 0.389268 \n", "19637 True 0.411602 \n", "\n", " audio_vector Gender \n", "154 [0.753, 0.871, 0.758, 126.994, 0.0062, 0.0] female \n", "18046 [0.749, 0.548, 0.759, 116.967, 0.0392, 0.0] female \n", "13526 [0.617, 0.801, 0.842, 95.881, 0.157, 4.82e-06] female \n", "13919 [0.72, 0.495, 0.864, 129.062, 0.591, 0.000133] female \n", "19637 [0.639, 0.619, 0.878, 136.041, 0.0533, 0.0] female " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ArtistUrl_spotifyTrackAlbumDanceabilityEnergyKeyLoudnessSpeechinessAcousticnessInstrumentalnessLivenessValenceTempoUrl_youtubeTitleChannelViewsLikesCommentsDescriptionLicensedofficial_videoStreamaudio_vectorGender
154Shakirahttps://open.spotify.com/artist/0EmeFodog0BfCg...Waka Waka (This Time for Africa) [The Official...Listen Up! The Official 2010 FIFA World Cup Album0.7580.8712.0-6.4080.1470.00620.0000000.06630.753126.994https://www.youtube.com/watch?v=pRpeEdMmmQ0Shakira - Waka Waka (This Time for Africa) (Th...shakiraVEVO0.4287090.4002450.079806Watch the official music video for \"Waka Waka ...TrueTrue0.186006[0.753, 0.871, 0.758, 126.994, 0.0062, 0.0]female
18046Camila Cabellohttps://open.spotify.com/artist/4nDoRrQiYLoBzw...SeñoritaShawn Mendes (Deluxe)0.7590.5489.0-6.0490.0290.03920.0000000.08280.749116.967https://www.youtube.com/watch?v=Pkh8UtuejGwShawn Mendes, Camila Cabello - Señorita (Offic...ShawnMendesVEVO0.1841230.3907590.039813Señorita: https://Senorita.lnk.to/OutNow \\n\\nC...TrueTrue0.689858[0.749, 0.548, 0.759, 116.967, 0.0392, 0.0]female
13526Selena Gomezhttps://open.spotify.com/artist/0C8ZW7ezQVs4UR...Taki Taki (with Selena Gomez, Ozuna & Cardi B)Taki Taki (with Selena Gomez, Ozuna & Cardi B)0.8420.8018.0-4.1670.2280.15700.0000050.06420.61795.881https://www.youtube.com/watch?v=ixkoVwKQaJgDJ Snake - Taki Taki ft. Selena Gomez, Ozuna, ...DJSnakeVEVO0.2988000.3696890.034382Stream and download Taki Taki - https://djsnak...TrueTrue0.407427[0.617, 0.801, 0.842, 95.881, 0.157, 4.82e-06]female
13919Kimbrahttps://open.spotify.com/artist/6hk7Yq1DU9QcCC...Somebody That I Used To KnowMaking Mirrors0.8640.4950.0-7.0360.0370.59100.0001330.09920.720129.062https://www.youtube.com/watch?v=8UVNT4wvIGYGotye - Somebody That I Used To Know (feat. Ki...gotyemusic0.2546170.2870860.049306The official music video for “Somebody That I ...TrueTrue0.389268[0.72, 0.495, 0.864, 129.062, 0.591, 0.000133]female
19637Lil Nas Xhttps://open.spotify.com/artist/7jVv8c5Fj3E9Vh...Old Town Road - Remix7 EP0.8780.6196.0-5.5600.1020.05330.0000000.11300.639136.041https://www.youtube.com/watch?v=r7qovpFAGrQLil Nas X - Old Town Road (Official Video) ft....LilNasXVEVO0.1323480.2351330.013437Week 17 version of Lil Nas X’s Billboard #1 hi...TrueTrue0.411602[0.639, 0.619, 0.878, 136.041, 0.0533, 0.0]female
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", " \n", " \n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "variable_name": "results" } }, "metadata": {} } ] }, { "cell_type": "code", "source": [ "user_input = input(\"What kind of song are you looking for? \")\n", "parsed = parse_user_input(user_input)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "40nLacTq__ig", "outputId": "8a72c8ef-131c-41f8-e2b0-86f9868ac9e1" }, "id": "40nLacTq__ig", "execution_count": 50, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "What kind of song are you looking for? I want 3 happy songs for my ecommerce big discount campaign in christmas\n", "🧠 Raw LLM Output:\n", " \n", "You are an expert music assistant trained to recommend songs for use in creative projects like ads, short films, social media videos, and campaigns.\n", "\n", "Your job is to extract structured information from the user's input so that we can recommend songs from our database based on Spotify audio features and YouTube metadata.\n", "\n", "Only return the following fields in JSON format:\n", "- \"mood\": overall emotion (e.g., sad, happy, dramatic)\n", "- \"context\": what kind of scene or use (e.g., wedding, breakup scene, brand ad)\n", "- \"preference\": how to sort (e.g., likes, views, popularity)\n", "- \"reference_song\": name of a song the user wants similar songs to\n", "- \"genre\": intended musical style (e.g., acoustic, pop, ambient)\n", "- \"instrumental\": 'yes' if vocals aren't needed, otherwise 'no'\n", "- \"tempo\": slow / medium / fast\n", "- \"artist\": if they want something from a specific artist\n", "- \"gender\": if they prefer male / female vocal\n", "- \"limit\": how many results to show (as a number)\n", "\n", "{\n", " \"mood\": \"...\",\n", " \"context\": \"...\",\n", " \"preference\": \"...\",\n", " \"reference_song\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"...\",\n", " \"limit\": \"...\"\n", "}\n", "\n", "User input: \"I want 3 happy songs for my ecommerce big discount campaign in christmas\"\n", "\n", "Respond ONLY with the JSON. Do not explain anything.\n", "\n", "{\n", " \"mood\": \"happy\",\n", " \"context\": \"ecommerce discount campaign christmas\",\n", " \"preference\": \"views\",\n", " \"reference_song\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"...\",\n", " \"limit\": \"3\"\n", "}\n" ] } ] }, { "cell_type": "code", "source": [ "parsed" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "SflCPgwqGmwB", "outputId": "d6749d03-5b67-47c6-c12d-2a77bc8ab4dc" }, "id": "SflCPgwqGmwB", "execution_count": 214, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "{'mood': 'sad',\n", " 'context': 'breakup montage',\n", " 'preference': 'views',\n", " 'reference_song': '...',\n", " 'genre': 'indie',\n", " 'instrumental': 'no',\n", " 'tempo': 'medium',\n", " 'artist': '...',\n", " 'gender': '...',\n", " 'limit': '5'}" ] }, "metadata": {}, "execution_count": 214 } ] }, { "cell_type": "code", "source": [ "if parsed[\"reference_song\"].strip().lower() not in [\"\", \"...\", \"none\", \"n/a\"]:\n", " results = recommend_by_reference_song(\n", " parsed,\n", " df_clean,\n", " audio_feature_cols,\n", " llm,\n", " reference_song_prompt\n", " )\n", "else:\n", " results = recommend_from_dataframe(parsed, df_clean)\n", "\n", "# Show results\n", "if results.empty:\n", " print(\"⚠️ No matching songs found.\")\n", "else:\n", " from IPython.display import display\n", " display(results)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 479 }, "id": "P_JmkOMuGiUO", "outputId": "4bcd41a8-c320-40e6-98a9-a9e289005b5e" }, "id": "P_JmkOMuGiUO", "execution_count": 51, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "🎵 Total songs before filtering: 19170\n", "🎯 Applied mood → Valence filter: 5871\n", "⚠️ Skipped genre filter due to value or overlap.\n", "⚠️ Skipped instrumental filter (empty or overlap)\n", "⚠️ Skipped tempo filter (empty or overlap)\n", "✅ Final songs returned: 3\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ " Artist Url_spotify \\\n", "1147 Luis Fonsi https://open.spotify.com/artist/4V8Sr092TqfHkf... \n", "365 Daddy Yankee https://open.spotify.com/artist/4VMYDCV2IEDYJA... \n", "14561 BTS https://open.spotify.com/artist/3Nrfpe0tUJi4K4... \n", "\n", " Track Album Danceability Energy Key Loudness Speechiness \\\n", "1147 Despacito VIDA 0.655 0.797 2.0 -4.787 0.1530 \n", "365 Despacito VIDA 0.655 0.797 2.0 -4.787 0.1530 \n", "14561 Dynamite BE 0.746 0.765 6.0 -4.410 0.0993 \n", "\n", " Acousticness Instrumentalness Liveness Valence Tempo \\\n", "1147 0.1980 0.0 0.0670 0.839 177.928 \n", "365 0.1980 0.0 0.0670 0.839 177.928 \n", "14561 0.0112 0.0 0.0936 0.737 114.044 \n", "\n", " Url_youtube \\\n", "1147 https://www.youtube.com/watch?v=kJQP7kiw5Fk \n", "365 https://www.youtube.com/watch?v=kJQP7kiw5Fk \n", "14561 https://www.youtube.com/watch?v=gdZLi9oWNZg \n", "\n", " Title Channel Views \\\n", "1147 Luis Fonsi - Despacito ft. Daddy Yankee LuisFonsiVEVO 1.000000 \n", "365 Luis Fonsi - Despacito ft. Daddy Yankee LuisFonsiVEVO 1.000000 \n", "14561 BTS (방탄소년단) 'Dynamite' Official MV HYBE LABELS 0.203096 \n", "\n", " Likes Comments Description \\\n", "1147 1.000000 0.264425 “Despacito” disponible ya en todas las platafo... \n", "365 0.999999 0.264425 “Despacito” disponible ya en todas las platafo... \n", "14561 0.706705 1.000000 BTS (방탄소년단) 'Dynamite' Official MV\\n\\n\\nCredit... \n", "\n", " Licensed official_video Stream \\\n", "1147 True True 0.444880 \n", "365 True True 0.444880 \n", "14561 True True 0.467277 \n", "\n", " audio_vector Gender similarity \n", "1147 [0.839, 0.797, 0.655, 177.928, 0.198, 0.0] male 0.999998 \n", "365 [0.839, 0.797, 0.655, 177.928, 0.198, 0.0] unknown 0.999998 \n", "14561 [0.737, 0.765, 0.746, 114.044, 0.0112, 0.0] unknown 0.999995 " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ArtistUrl_spotifyTrackAlbumDanceabilityEnergyKeyLoudnessSpeechinessAcousticnessInstrumentalnessLivenessValenceTempoUrl_youtubeTitleChannelViewsLikesCommentsDescriptionLicensedofficial_videoStreamaudio_vectorGendersimilarity
1147Luis Fonsihttps://open.spotify.com/artist/4V8Sr092TqfHkf...DespacitoVIDA0.6550.7972.0-4.7870.15300.19800.00.06700.839177.928https://www.youtube.com/watch?v=kJQP7kiw5FkLuis Fonsi - Despacito ft. Daddy YankeeLuisFonsiVEVO1.0000001.0000000.264425“Despacito” disponible ya en todas las platafo...TrueTrue0.444880[0.839, 0.797, 0.655, 177.928, 0.198, 0.0]male0.999998
365Daddy Yankeehttps://open.spotify.com/artist/4VMYDCV2IEDYJA...DespacitoVIDA0.6550.7972.0-4.7870.15300.19800.00.06700.839177.928https://www.youtube.com/watch?v=kJQP7kiw5FkLuis Fonsi - Despacito ft. Daddy YankeeLuisFonsiVEVO1.0000000.9999990.264425“Despacito” disponible ya en todas las platafo...TrueTrue0.444880[0.839, 0.797, 0.655, 177.928, 0.198, 0.0]unknown0.999998
14561BTShttps://open.spotify.com/artist/3Nrfpe0tUJi4K4...DynamiteBE0.7460.7656.0-4.4100.09930.01120.00.09360.737114.044https://www.youtube.com/watch?v=gdZLi9oWNZgBTS (방탄소년단) 'Dynamite' Official MVHYBE LABELS0.2030960.7067051.000000BTS (방탄소년단) 'Dynamite' Official MV\\n\\n\\nCredit...TrueTrue0.467277[0.737, 0.765, 0.746, 114.044, 0.0112, 0.0]unknown0.999995
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", " \n", " \n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "variable_name": "results" } }, "metadata": {} } ] }, { "cell_type": "code", "source": [ "results = recommend_from_dataframe(parsed, df_clean)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "C54MXeIlAGbg", "outputId": "87f59bb2-1304-4440-f88a-f24b020347f8" }, "id": "C54MXeIlAGbg", "execution_count": 200, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "🎵 Total songs before filtering: 19170\n", "🎯 Applied mood → Valence filter: 3971\n", "⚠️ Skipped genre filter due to value or overlap.\n", "⚠️ Skipped instrumental filter (empty or overlap)\n", "🎯 Applied tempo filter: 1175\n", "✅ Final songs returned: 10\n" ] } ] }, { "cell_type": "code", "source": [ "results" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "yh231fDx_u2B", "outputId": "ea8b532c-97cd-464a-ed36-65d951a4569b" }, "id": "yh231fDx_u2B", "execution_count": 201, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Artist Url_spotify \\\n", "18568 Billie Eilish https://open.spotify.com/artist/6qqNVTkY8uBg9c... \n", "140 Khalid https://open.spotify.com/artist/6LuN9FCkKOj5Pc... \n", "12449 Ed Sheeran https://open.spotify.com/artist/6eUKZXaKkcviH0... \n", "11050 Willy William https://open.spotify.com/artist/4RSyJzf7ef6Iu2... \n", "16488 MØ https://open.spotify.com/artist/0bdfiayQAKewqE... \n", "15393 DJ Snake https://open.spotify.com/artist/540vIaP2JwjQb9... \n", "61 Linkin Park https://open.spotify.com/artist/6XyY86QOPPrYVG... \n", "15255 The Weeknd https://open.spotify.com/artist/1Xyo4u8uXC1ZmM... \n", "19966 j-hope https://open.spotify.com/artist/0b1sIQumIAsNbq... \n", "16675 Alan Walker https://open.spotify.com/artist/7vk5e3vY1uw9pl... \n", "\n", " Track \\\n", "18568 lovely (with Khalid) \n", "140 lovely (with Khalid) \n", "12449 Perfect \n", "11050 Mi Gente \n", "16488 Lean On \n", "15393 Lean On \n", "61 Numb \n", "15255 The Hills \n", "19966 Chicken Noodle Soup (feat. Becky G) \n", "16675 Alone \n", "\n", " Album Danceability Energy Key \\\n", "18568 lovely (with Khalid) 0.351 0.296 4.0 \n", "140 lovely (with Khalid) 0.351 0.296 4.0 \n", "12449 ÷ (Deluxe) 0.599 0.448 8.0 \n", "11050 Vibras 0.548 0.704 11.0 \n", "16488 Peace Is The Mission (Extended) 0.723 0.809 7.0 \n", "15393 Peace Is The Mission (Extended) 0.723 0.809 7.0 \n", "61 Meteora 0.496 0.863 9.0 \n", "15255 Beauty Behind The Madness 0.585 0.564 0.0 \n", "19966 Chicken Noodle Soup (feat. Becky G) 0.827 0.817 2.0 \n", "16675 Different World 0.673 0.914 10.0 \n", "\n", " Loudness Speechiness Acousticness Instrumentalness Liveness \\\n", "18568 -10.109 0.0333 0.93400 0.000000 0.095 \n", "140 -10.109 0.0333 0.93400 0.000000 0.095 \n", "12449 -6.312 0.0232 0.16300 0.000000 0.106 \n", "11050 -4.838 0.0777 0.01680 0.000023 0.143 \n", "16488 -3.081 0.0625 0.00346 0.001230 0.565 \n", "15393 -3.081 0.0625 0.00346 0.001230 0.565 \n", "61 -4.153 0.0381 0.00460 0.000000 0.639 \n", "15255 -7.063 0.0515 0.06710 0.000000 0.135 \n", "19966 -4.081 0.0953 0.00496 0.000012 0.294 \n", "16675 -3.962 0.0496 0.22900 0.000478 0.186 \n", "\n", " Valence Tempo Url_youtube \\\n", "18568 0.120 115.284 https://www.youtube.com/watch?v=V1Pl8CzNzCw \n", "140 0.120 115.284 https://www.youtube.com/watch?v=V1Pl8CzNzCw \n", "12449 0.168 95.050 https://www.youtube.com/watch?v=2Vv-BfVoq4g \n", "11050 0.288 104.666 https://www.youtube.com/watch?v=wnJ6LuUFpMo \n", "16488 0.274 98.007 https://www.youtube.com/watch?v=YqeW9_5kURI \n", "15393 0.274 98.007 https://www.youtube.com/watch?v=YqeW9_5kURI \n", "61 0.243 110.018 https://www.youtube.com/watch?v=kXYiU_JCYtU \n", "15255 0.137 113.003 https://www.youtube.com/watch?v=yzTuBuRdAyA \n", "19966 0.167 97.008 https://www.youtube.com/watch?v=i23NEQEFpgQ \n", "16675 0.183 97.021 https://www.youtube.com/watch?v=1-xGerv5FOk \n", "\n", " Title \\\n", "18568 Billie Eilish, Khalid - lovely \n", "140 Billie Eilish, Khalid - lovely \n", "12449 Ed Sheeran - Perfect (Official Music Video) \n", "11050 J Balvin, Willy William - Mi Gente (Official V... \n", "16488 Major Lazer & DJ Snake - Lean On (feat. MØ) (O... \n", "15393 Major Lazer & DJ Snake - Lean On (feat. MØ) (O... \n", "61 Numb [Official Music Video] - Linkin Park \n", "15255 The Weeknd - The Hills (Official Video) \n", "19966 j-hope 'Chicken Noodle Soup (feat. Becky G)' MV \n", "16675 Alan Walker - Alone \n", "\n", " Channel Views Likes Comments \\\n", "18568 BillieEilishVEVO 0.213054 0.480938 0.034938 \n", "140 BillieEilishVEVO 0.213052 0.480931 0.034938 \n", "12449 Ed Sheeran 0.415994 0.374749 0.030227 \n", "11050 jbalvinVEVO 0.393505 0.343504 0.032493 \n", "16488 Major Lazer Official 0.411507 0.319187 0.027990 \n", "15393 Major Lazer Official 0.411507 0.319187 0.027990 \n", "61 Linkin Park 0.238715 0.243002 0.034255 \n", "15255 TheWeekndVEVO 0.239357 0.231955 0.019159 \n", "19966 HYBE LABELS 0.046386 0.231836 0.049194 \n", "16675 Alan Walker 0.160902 0.217394 0.025805 \n", "\n", " Description Licensed \\\n", "18568 Listen to “lovely” (with Khalid): http://smart... True \n", "140 Listen to “lovely” (with Khalid): http://smart... True \n", "12449 The official music video for Ed Sheeran - Perf... True \n", "11050 Listen to J Balvin’s top songs here: \\nhttps:/... True \n", "16488 Major Lazer & DJ Snake - Lean On (feat. MØ) (O... False \n", "15393 Major Lazer & DJ Snake - Lean On (feat. MØ) (O... False \n", "61 Watch the official music video for Numb by Lin... True \n", "15255 The Weeknd - The Hills (Official Video)\\nDownl... True \n", "19966 j-hope 'Chicken Noodle Soup (feat. Becky G)' M... True \n", "16675 Click the link to listen to my latest album: \\... True \n", "\n", " official_video Stream \\\n", "18568 True 0.623227 \n", "140 True 0.623227 \n", "12449 True 0.682910 \n", "11050 True 0.379564 \n", "16488 False 0.505849 \n", "15393 False 0.505849 \n", "61 True 0.352931 \n", "15255 True 0.520517 \n", "19966 True 0.047983 \n", "16675 True 0.179973 \n", "\n", " audio_vector Gender similarity \n", "18568 [0.12, 0.296, 0.351, 115.284, 0.934, 0.0] female 0.999953 \n", "140 [0.12, 0.296, 0.351, 115.284, 0.934, 0.0] male 0.999953 \n", "12449 [0.168, 0.448, 0.599, 95.05, 0.163, 0.0] male 0.999994 \n", "11050 [0.288, 0.704, 0.548, 104.666, 0.0168, 2.25e-05] male 0.999999 \n", "16488 [0.274, 0.809, 0.723, 98.007, 0.00346, 0.00123] unknown 0.999997 \n", "15393 [0.274, 0.809, 0.723, 98.007, 0.00346, 0.00123] unknown 0.999997 \n", "61 [0.243, 0.863, 0.496, 110.018, 0.0046, 0.0] unknown 0.999999 \n", "15255 [0.137, 0.564, 0.585, 113.003, 0.0671, 0.0] female 0.999996 \n", "19966 [0.167, 0.817, 0.827, 97.008, 0.00496, 1.19e-05] unknown 0.999994 \n", "16675 [0.183, 0.914, 0.673, 97.021, 0.229, 0.000478] male 0.999995 " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ArtistUrl_spotifyTrackAlbumDanceabilityEnergyKeyLoudnessSpeechinessAcousticnessInstrumentalnessLivenessValenceTempoUrl_youtubeTitleChannelViewsLikesCommentsDescriptionLicensedofficial_videoStreamaudio_vectorGendersimilarity
18568Billie Eilishhttps://open.spotify.com/artist/6qqNVTkY8uBg9c...lovely (with Khalid)lovely (with Khalid)0.3510.2964.0-10.1090.03330.934000.0000000.0950.120115.284https://www.youtube.com/watch?v=V1Pl8CzNzCwBillie Eilish, Khalid - lovelyBillieEilishVEVO0.2130540.4809380.034938Listen to “lovely” (with Khalid): http://smart...TrueTrue0.623227[0.12, 0.296, 0.351, 115.284, 0.934, 0.0]female0.999953
140Khalidhttps://open.spotify.com/artist/6LuN9FCkKOj5Pc...lovely (with Khalid)lovely (with Khalid)0.3510.2964.0-10.1090.03330.934000.0000000.0950.120115.284https://www.youtube.com/watch?v=V1Pl8CzNzCwBillie Eilish, Khalid - lovelyBillieEilishVEVO0.2130520.4809310.034938Listen to “lovely” (with Khalid): http://smart...TrueTrue0.623227[0.12, 0.296, 0.351, 115.284, 0.934, 0.0]male0.999953
12449Ed Sheeranhttps://open.spotify.com/artist/6eUKZXaKkcviH0...Perfect÷ (Deluxe)0.5990.4488.0-6.3120.02320.163000.0000000.1060.16895.050https://www.youtube.com/watch?v=2Vv-BfVoq4gEd Sheeran - Perfect (Official Music Video)Ed Sheeran0.4159940.3747490.030227The official music video for Ed Sheeran - Perf...TrueTrue0.682910[0.168, 0.448, 0.599, 95.05, 0.163, 0.0]male0.999994
11050Willy Williamhttps://open.spotify.com/artist/4RSyJzf7ef6Iu2...Mi GenteVibras0.5480.70411.0-4.8380.07770.016800.0000230.1430.288104.666https://www.youtube.com/watch?v=wnJ6LuUFpMoJ Balvin, Willy William - Mi Gente (Official V...jbalvinVEVO0.3935050.3435040.032493Listen to J Balvin’s top songs here: \\nhttps:/...TrueTrue0.379564[0.288, 0.704, 0.548, 104.666, 0.0168, 2.25e-05]male0.999999
16488https://open.spotify.com/artist/0bdfiayQAKewqE...Lean OnPeace Is The Mission (Extended)0.7230.8097.0-3.0810.06250.003460.0012300.5650.27498.007https://www.youtube.com/watch?v=YqeW9_5kURIMajor Lazer & DJ Snake - Lean On (feat. MØ) (O...Major Lazer Official0.4115070.3191870.027990Major Lazer & DJ Snake - Lean On (feat. MØ) (O...FalseFalse0.505849[0.274, 0.809, 0.723, 98.007, 0.00346, 0.00123]unknown0.999997
15393DJ Snakehttps://open.spotify.com/artist/540vIaP2JwjQb9...Lean OnPeace Is The Mission (Extended)0.7230.8097.0-3.0810.06250.003460.0012300.5650.27498.007https://www.youtube.com/watch?v=YqeW9_5kURIMajor Lazer & DJ Snake - Lean On (feat. MØ) (O...Major Lazer Official0.4115070.3191870.027990Major Lazer & DJ Snake - Lean On (feat. MØ) (O...FalseFalse0.505849[0.274, 0.809, 0.723, 98.007, 0.00346, 0.00123]unknown0.999997
61Linkin Parkhttps://open.spotify.com/artist/6XyY86QOPPrYVG...NumbMeteora0.4960.8639.0-4.1530.03810.004600.0000000.6390.243110.018https://www.youtube.com/watch?v=kXYiU_JCYtUNumb [Official Music Video] - Linkin ParkLinkin Park0.2387150.2430020.034255Watch the official music video for Numb by Lin...TrueTrue0.352931[0.243, 0.863, 0.496, 110.018, 0.0046, 0.0]unknown0.999999
15255The Weekndhttps://open.spotify.com/artist/1Xyo4u8uXC1ZmM...The HillsBeauty Behind The Madness0.5850.5640.0-7.0630.05150.067100.0000000.1350.137113.003https://www.youtube.com/watch?v=yzTuBuRdAyAThe Weeknd - The Hills (Official Video)TheWeekndVEVO0.2393570.2319550.019159The Weeknd - The Hills (Official Video)\\nDownl...TrueTrue0.520517[0.137, 0.564, 0.585, 113.003, 0.0671, 0.0]female0.999996
19966j-hopehttps://open.spotify.com/artist/0b1sIQumIAsNbq...Chicken Noodle Soup (feat. Becky G)Chicken Noodle Soup (feat. Becky G)0.8270.8172.0-4.0810.09530.004960.0000120.2940.16797.008https://www.youtube.com/watch?v=i23NEQEFpgQj-hope 'Chicken Noodle Soup (feat. Becky G)' MVHYBE LABELS0.0463860.2318360.049194j-hope 'Chicken Noodle Soup (feat. Becky G)' M...TrueTrue0.047983[0.167, 0.817, 0.827, 97.008, 0.00496, 1.19e-05]unknown0.999994
16675Alan Walkerhttps://open.spotify.com/artist/7vk5e3vY1uw9pl...AloneDifferent World0.6730.91410.0-3.9620.04960.229000.0004780.1860.18397.021https://www.youtube.com/watch?v=1-xGerv5FOkAlan Walker - AloneAlan Walker0.1609020.2173940.025805Click the link to listen to my latest album: \\...TrueTrue0.179973[0.183, 0.914, 0.673, 97.021, 0.229, 0.000478]male0.999995
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", " \n", " \n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "variable_name": "results" } }, "metadata": {}, "execution_count": 201 } ] }, { "cell_type": "code", "source": [ "results[\"Explanation\"] = results.apply(lambda row: generate_explanation(user_input, row), axis=1)" ], "metadata": { "id": "wqM3P7ZQ9Cy9" }, "id": "wqM3P7ZQ9Cy9", "execution_count": 216, "outputs": [] }, { "cell_type": "code", "source": [ "results" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 625 }, "id": "_G1oCba29XlM", "outputId": "6c96722a-ff07-452f-9be1-51a4fdc715ec" }, "id": "_G1oCba29XlM", "execution_count": 217, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Artist Url_spotify \\\n", "18568 Billie Eilish https://open.spotify.com/artist/6qqNVTkY8uBg9c... \n", "140 Khalid https://open.spotify.com/artist/6LuN9FCkKOj5Pc... \n", "16258 AURORA https://open.spotify.com/artist/1WgXqy2Dd70QQO... \n", "13520 Selena Gomez https://open.spotify.com/artist/0C8ZW7ezQVs4UR... \n", "19229 Jhayco https://open.spotify.com/artist/6nVcHLIgY5pE2Y... \n", "\n", " Track Album \\\n", "18568 lovely (with Khalid) lovely (with Khalid) \n", "140 lovely (with Khalid) lovely (with Khalid) \n", "16258 Runaway All My Demons Greeting Me as a Friend (Deluxe) \n", "13520 Lose You To Love Me Rare \n", "19229 DÁKITI EL ÚLTIMO TOUR DEL MUNDO \n", "\n", " Danceability Energy Key Loudness Speechiness Acousticness \\\n", "18568 0.351 0.296 4.0 -10.109 0.0333 0.934 \n", "140 0.351 0.296 4.0 -10.109 0.0333 0.934 \n", "16258 0.459 0.276 11.0 -10.339 0.0360 0.630 \n", "13520 0.488 0.343 4.0 -8.985 0.0436 0.556 \n", "19229 0.731 0.573 4.0 -10.059 0.0544 0.401 \n", "\n", " Instrumentalness Liveness Valence Tempo \\\n", "18568 0.000000 0.095 0.1200 115.284 \n", "140 0.000000 0.095 0.1200 115.284 \n", "16258 0.000095 0.104 0.1280 114.169 \n", "13520 0.000000 0.210 0.0978 102.819 \n", "19229 0.000052 0.113 0.1450 109.928 \n", "\n", " Url_youtube \\\n", "18568 https://www.youtube.com/watch?v=V1Pl8CzNzCw \n", "140 https://www.youtube.com/watch?v=V1Pl8CzNzCw \n", "16258 https://www.youtube.com/watch?v=d_HlPboLRL8 \n", "13520 https://www.youtube.com/watch?v=zlJDTxahav0 \n", "19229 https://www.youtube.com/watch?v=TmKh7lAwnBI \n", "\n", " Title Channel \\\n", "18568 Billie Eilish, Khalid - lovely BillieEilishVEVO \n", "140 Billie Eilish, Khalid - lovely BillieEilishVEVO \n", "16258 AURORA - Runaway iamAURORAVEVO \n", "13520 Selena Gomez - Lose You To Love Me (Official M... SelenaGomezVEVO \n", "19229 BAD BUNNY x JHAY CORTEZ - DÁKITI (Video Oficial) Bad Bunny \n", "\n", " Views Likes Comments \\\n", "18568 0.213054 0.480938 0.034938 \n", "140 0.213052 0.480931 0.034938 \n", "16258 0.062888 0.190374 0.013156 \n", "13520 0.052497 0.169564 0.021886 \n", "19229 0.154994 0.167239 0.016472 \n", "\n", " Description Licensed \\\n", "18568 Listen to “lovely” (with Khalid): http://smart... True \n", "140 Listen to “lovely” (with Khalid): http://smart... True \n", "16258 Aurora's brand-new album The Gods We Can Touch... True \n", "13520 Get Selena's new album 'Rare', out now: http:/... True \n", "19229 BAD BUNNY x JHAY CORTEZ\\nDÁKITI | EL ÚLTIMO TO... True \n", "\n", " official_video Stream \\\n", "18568 True 0.623227 \n", "140 True 0.623227 \n", "16258 True 0.188255 \n", "13520 True 0.287106 \n", "19229 True 0.478420 \n", "\n", " audio_vector Gender similarity \\\n", "18568 [0.12, 0.296, 0.351, 115.284, 0.934, 0.0] female 0.999945 \n", "140 [0.12, 0.296, 0.351, 115.284, 0.934, 0.0] male 0.999945 \n", "16258 [0.128, 0.276, 0.459, 114.169, 0.63, 9.5e-05] unknown 0.999960 \n", "13520 [0.0978, 0.343, 0.488, 102.819, 0.556, 0.0] female 0.999966 \n", "19229 [0.145, 0.573, 0.731, 109.928, 0.401, 5.22e-05] unknown 0.999982 \n", "\n", " Explanation \n", "18568 1. \"lovely\" is a heartfelt and melancholic son... \n", "140 \"lovely\" is a great fit for a breakup montage ... \n", "16258 This song, \"Runaway\" by AURORA, is an appropri... \n", "13520 This song is a good fit for a sad indie acoust... \n", "19229 \"Bad Bunny and Jhay Cortez's \"Dakiti\" is a per... " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ArtistUrl_spotifyTrackAlbumDanceabilityEnergyKeyLoudnessSpeechinessAcousticnessInstrumentalnessLivenessValenceTempoUrl_youtubeTitleChannelViewsLikesCommentsDescriptionLicensedofficial_videoStreamaudio_vectorGendersimilarityExplanation
18568Billie Eilishhttps://open.spotify.com/artist/6qqNVTkY8uBg9c...lovely (with Khalid)lovely (with Khalid)0.3510.2964.0-10.1090.03330.9340.0000000.0950.1200115.284https://www.youtube.com/watch?v=V1Pl8CzNzCwBillie Eilish, Khalid - lovelyBillieEilishVEVO0.2130540.4809380.034938Listen to “lovely” (with Khalid): http://smart...TrueTrue0.623227[0.12, 0.296, 0.351, 115.284, 0.934, 0.0]female0.9999451. \"lovely\" is a heartfelt and melancholic son...
140Khalidhttps://open.spotify.com/artist/6LuN9FCkKOj5Pc...lovely (with Khalid)lovely (with Khalid)0.3510.2964.0-10.1090.03330.9340.0000000.0950.1200115.284https://www.youtube.com/watch?v=V1Pl8CzNzCwBillie Eilish, Khalid - lovelyBillieEilishVEVO0.2130520.4809310.034938Listen to “lovely” (with Khalid): http://smart...TrueTrue0.623227[0.12, 0.296, 0.351, 115.284, 0.934, 0.0]male0.999945\"lovely\" is a great fit for a breakup montage ...
16258AURORAhttps://open.spotify.com/artist/1WgXqy2Dd70QQO...RunawayAll My Demons Greeting Me as a Friend (Deluxe)0.4590.27611.0-10.3390.03600.6300.0000950.1040.1280114.169https://www.youtube.com/watch?v=d_HlPboLRL8AURORA - RunawayiamAURORAVEVO0.0628880.1903740.013156Aurora's brand-new album The Gods We Can Touch...TrueTrue0.188255[0.128, 0.276, 0.459, 114.169, 0.63, 9.5e-05]unknown0.999960This song, \"Runaway\" by AURORA, is an appropri...
13520Selena Gomezhttps://open.spotify.com/artist/0C8ZW7ezQVs4UR...Lose You To Love MeRare0.4880.3434.0-8.9850.04360.5560.0000000.2100.0978102.819https://www.youtube.com/watch?v=zlJDTxahav0Selena Gomez - Lose You To Love Me (Official M...SelenaGomezVEVO0.0524970.1695640.021886Get Selena's new album 'Rare', out now: http:/...TrueTrue0.287106[0.0978, 0.343, 0.488, 102.819, 0.556, 0.0]female0.999966This song is a good fit for a sad indie acoust...
19229Jhaycohttps://open.spotify.com/artist/6nVcHLIgY5pE2Y...DÁKITIEL ÚLTIMO TOUR DEL MUNDO0.7310.5734.0-10.0590.05440.4010.0000520.1130.1450109.928https://www.youtube.com/watch?v=TmKh7lAwnBIBAD BUNNY x JHAY CORTEZ - DÁKITI (Video Oficial)Bad Bunny0.1549940.1672390.016472BAD BUNNY x JHAY CORTEZ\\nDÁKITI | EL ÚLTIMO TO...TrueTrue0.478420[0.145, 0.573, 0.731, 109.928, 0.401, 5.22e-05]unknown0.999982\"Bad Bunny and Jhay Cortez's \"Dakiti\" is a per...
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", " \n", " \n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "variable_name": "results" } }, "metadata": {}, "execution_count": 217 } ] }, { "cell_type": "code", "source": [ "results['Explanation'].iloc[3]" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 53 }, "id": "SKMNdOvX9nvF", "outputId": "1815e91c-37cd-4d16-d1c2-edaab44df827" }, "id": "SKMNdOvX9nvF", "execution_count": 219, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "\"This song is a good fit for a sad indie acoustic breakup montage because it has an emotional and introspective tone, with Selena Gomez's heartfelt vocals and relatable lyrics about a painful breakup. The instrumental arrangement is simple and acoustic, adding to the song's emotional impact.\"" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" } }, "metadata": {}, "execution_count": 219 } ] }, { "cell_type": "markdown", "source": [ "### 4 Implementation" ], "metadata": { "id": "816lxuSaeOpY" }, "id": "816lxuSaeOpY" }, { "cell_type": "markdown", "source": [ "#### 4.1 Testing corner for Gradio (in progress...)" ], "metadata": { "id": "nGw_b_ztvaKm" }, "id": "nGw_b_ztvaKm" }, { "cell_type": "code", "source": [ "!pip install gradio" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "collapsed": true, "id": "MKfwTcqBfGvS", "outputId": "3dee5652-460d-45f8-cd16-4fe561a7e1de" }, "id": "MKfwTcqBfGvS", "execution_count": 26, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Collecting gradio\n", " Downloading gradio-5.23.1-py3-none-any.whl.metadata (16 kB)\n", "Collecting aiofiles<24.0,>=22.0 (from gradio)\n", " Downloading aiofiles-23.2.1-py3-none-any.whl.metadata (9.7 kB)\n", "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (4.9.0)\n", "Collecting fastapi<1.0,>=0.115.2 (from gradio)\n", " Downloading fastapi-0.115.12-py3-none-any.whl.metadata (27 kB)\n", "Collecting ffmpy (from gradio)\n", " Downloading ffmpy-0.5.0-py3-none-any.whl.metadata (3.0 kB)\n", "Collecting gradio-client==1.8.0 (from gradio)\n", " Downloading gradio_client-1.8.0-py3-none-any.whl.metadata (7.1 kB)\n", "Collecting groovy~=0.1 (from gradio)\n", " Downloading groovy-0.1.2-py3-none-any.whl.metadata (6.1 kB)\n", "Requirement already satisfied: httpx>=0.24.1 in /usr/local/lib/python3.11/dist-packages (from gradio) (0.28.1)\n", "Requirement already satisfied: huggingface-hub>=0.28.1 in /usr/local/lib/python3.11/dist-packages (from gradio) (0.29.3)\n", "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (3.1.6)\n", "Requirement already satisfied: markupsafe<4.0,>=2.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (3.0.2)\n", "Requirement already satisfied: numpy<3.0,>=1.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (2.0.2)\n", "Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (3.10.15)\n", "Requirement already satisfied: packaging in /usr/local/lib/python3.11/dist-packages (from gradio) (24.2)\n", "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (2.2.2)\n", "Requirement already satisfied: pillow<12.0,>=8.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (11.1.0)\n", "Requirement already satisfied: pydantic>=2.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (2.10.6)\n", "Collecting pydub (from gradio)\n", " Downloading pydub-0.25.1-py2.py3-none-any.whl.metadata (1.4 kB)\n", "Collecting python-multipart>=0.0.18 (from gradio)\n", " Downloading python_multipart-0.0.20-py3-none-any.whl.metadata (1.8 kB)\n", "Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (6.0.2)\n", "Collecting ruff>=0.9.3 (from gradio)\n", " Downloading ruff-0.11.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (25 kB)\n", "Collecting safehttpx<0.2.0,>=0.1.6 (from gradio)\n", " Downloading safehttpx-0.1.6-py3-none-any.whl.metadata (4.2 kB)\n", "Collecting semantic-version~=2.0 (from gradio)\n", " Downloading semantic_version-2.10.0-py2.py3-none-any.whl.metadata (9.7 kB)\n", "Collecting starlette<1.0,>=0.40.0 (from gradio)\n", " Downloading starlette-0.46.1-py3-none-any.whl.metadata (6.2 kB)\n", "Collecting tomlkit<0.14.0,>=0.12.0 (from gradio)\n", " Downloading tomlkit-0.13.2-py3-none-any.whl.metadata (2.7 kB)\n", "Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.11/dist-packages (from gradio) (0.15.2)\n", "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (4.12.2)\n", "Collecting uvicorn>=0.14.0 (from gradio)\n", " Downloading uvicorn-0.34.0-py3-none-any.whl.metadata (6.5 kB)\n", "Requirement already satisfied: fsspec in /usr/local/lib/python3.11/dist-packages (from gradio-client==1.8.0->gradio) (2025.3.0)\n", "Requirement already satisfied: websockets<16.0,>=10.0 in /usr/local/lib/python3.11/dist-packages (from gradio-client==1.8.0->gradio) (15.0.1)\n", "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.11/dist-packages (from anyio<5.0,>=3.0->gradio) (3.10)\n", "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.11/dist-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n", "Requirement already satisfied: certifi in /usr/local/lib/python3.11/dist-packages (from httpx>=0.24.1->gradio) (2025.1.31)\n", "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx>=0.24.1->gradio) (1.0.7)\n", "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.1->gradio) (3.18.0)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.1->gradio) (2.32.3)\n", "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.1->gradio) (4.67.1)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/dist-packages (from pandas<3.0,>=1.0->gradio) (2.8.2)\n", "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.11/dist-packages (from pandas<3.0,>=1.0->gradio) (2025.1)\n", "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.11/dist-packages (from pandas<3.0,>=1.0->gradio) (2025.1)\n", "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic>=2.0->gradio) (0.7.0)\n", "Requirement already satisfied: pydantic-core==2.27.2 in /usr/local/lib/python3.11/dist-packages (from pydantic>=2.0->gradio) (2.27.2)\n", "Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.11/dist-packages (from typer<1.0,>=0.12->gradio) (8.1.8)\n", "Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.11/dist-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n", "Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.11/dist-packages (from typer<1.0,>=0.12->gradio) (13.9.4)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/dist-packages (from python-dateutil>=2.8.2->pandas<3.0,>=1.0->gradio) (1.17.0)\n", "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.11/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n", "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.11/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.18.0)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface-hub>=0.28.1->gradio) (3.4.1)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface-hub>=0.28.1->gradio) (2.3.0)\n", "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.11/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n", "Downloading gradio-5.23.1-py3-none-any.whl (51.3 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.3/51.3 MB\u001b[0m \u001b[31m20.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading gradio_client-1.8.0-py3-none-any.whl (322 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m322.2/322.2 kB\u001b[0m \u001b[31m16.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n", "Downloading fastapi-0.115.12-py3-none-any.whl (95 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.2/95.2 kB\u001b[0m \u001b[31m8.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading groovy-0.1.2-py3-none-any.whl (14 kB)\n", "Downloading python_multipart-0.0.20-py3-none-any.whl (24 kB)\n", "Downloading ruff-0.11.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.3 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m11.3/11.3 MB\u001b[0m \u001b[31m101.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading safehttpx-0.1.6-py3-none-any.whl (8.7 kB)\n", "Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n", "Downloading starlette-0.46.1-py3-none-any.whl (71 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.0/72.0 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading tomlkit-0.13.2-py3-none-any.whl (37 kB)\n", "Downloading uvicorn-0.34.0-py3-none-any.whl (62 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.3/62.3 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading ffmpy-0.5.0-py3-none-any.whl (6.0 kB)\n", "Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n", "Installing collected packages: pydub, uvicorn, tomlkit, semantic-version, ruff, python-multipart, groovy, ffmpy, aiofiles, starlette, safehttpx, gradio-client, fastapi, gradio\n", "Successfully installed aiofiles-23.2.1 fastapi-0.115.12 ffmpy-0.5.0 gradio-5.23.1 gradio-client-1.8.0 groovy-0.1.2 pydub-0.25.1 python-multipart-0.0.20 ruff-0.11.2 safehttpx-0.1.6 semantic-version-2.10.0 starlette-0.46.1 tomlkit-0.13.2 uvicorn-0.34.0\n" ] } ] }, { "cell_type": "code", "source": [ "import gradio as gr\n", "import pandas as pd\n", "import datetime\n", "\n", "# Global feedback tracker\n", "feedback_df = pd.DataFrame(columns=[\"Query\", \"Title\", \"Artist\", \"Feedback\"])\n", "\n", "# Save functions\n", "def submit_feedback(query, title, artist, feedback_type):\n", " global feedback_df\n", " new_feedback = pd.DataFrame([{\n", " \"Query\": query,\n", " \"Title\": title,\n", " \"Artist\": artist,\n", " \"Feedback\": feedback_type\n", " }])\n", " feedback_df = pd.concat([feedback_df, new_feedback], ignore_index=True)\n", " return f\"✅ Feedback recorded for {title}: {feedback_type}\"\n", "\n", "def save_results(results_df):\n", " timestamp = datetime.datetime.now().strftime(\"%Y%m%d_%H%M%S\")\n", " path = f\"recommendations_{timestamp}.csv\"\n", " results_df.to_csv(path, index=False)\n", " return path\n", "\n", "def save_feedback():\n", " timestamp = datetime.datetime.now().strftime(\"%Y%m%d_%H%M%S\")\n", " path = f\"feedback_log_{timestamp}.csv\"\n", " feedback_df.to_csv(path, index=False)\n", " return path\n", "\n", "# Gradio UI\n", "with gr.Blocks() as demo:\n", " gr.Markdown(\"## 🎧 Song Recommender with Feedback\")\n", "\n", " # Input & Run\n", " user_input = gr.Textbox(label=\"What kind of song are you looking for?\")\n", " btn_run = gr.Button(\"🔍 Recommend Songs\")\n", "\n", " # Output Table + State\n", " song_output = gr.Dataframe(label=\"🎵 Recommended Songs\")\n", " results_state = gr.State()\n", "\n", " # Hidden Download Button\n", " download_btn = gr.Button(\"⬇️ Download Recommendations CSV\", visible=False)\n", " download_file = gr.File()\n", "\n", " # Wire up Run button\n", " def run_query_and_show_download(input_text):\n", " df_display, df_full = handle_query(input_text)\n", " return df_display, df_full, gr.update(visible=True)\n", "\n", " btn_run.click(\n", " fn=run_query_and_show_download,\n", " inputs=[user_input],\n", " outputs=[song_output, results_state, download_btn]\n", " )\n", "\n", " download_btn.click(fn=save_results, inputs=[results_state], outputs=download_file)\n", "\n", " # Feedback Section (Hidden until triggered)\n", " gr.Markdown(\"### 🧠 Optional Feedback\")\n", " toggle_feedback_btn = gr.Button(\"✍️ Give Feedback\")\n", " feedback_group = gr.Group(visible=False)\n", "\n", " with feedback_group:\n", " with gr.Row():\n", " feedback_title = gr.Textbox(label=\"Song Title\")\n", " feedback_artist = gr.Textbox(label=\"Artist\")\n", "\n", " with gr.Row():\n", " btn_like = gr.Button(\"👍 Relevant\")\n", " btn_dislike = gr.Button(\"👎 Not Relevant\")\n", "\n", " feedback_response = gr.Textbox(label=\"Feedback Message\")\n", "\n", " toggle_feedback_btn.click(lambda: gr.update(visible=True), None, outputs=[feedback_group])\n", "\n", " btn_like.click(\n", " fn=submit_feedback,\n", " inputs=[user_input, feedback_title, feedback_artist, gr.State(\"👍\")],\n", " outputs=feedback_response\n", " )\n", "\n", " btn_dislike.click(\n", " fn=submit_feedback,\n", " inputs=[user_input, feedback_title, feedback_artist, gr.State(\"👎\")],\n", " outputs=feedback_response\n", " )\n", "\n", "demo.launch(share=True)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 612 }, "id": "LI_N8rTJeTzC", "outputId": "5dddfe1e-e917-43ae-de5c-f2eed7b25809" }, "id": "LI_N8rTJeTzC", "execution_count": 97, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n", "* Running on public URL: https://029a1ee6fd1f73665c.gradio.live\n", "\n", "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ "
" ] }, "metadata": {} }, { "output_type": "execute_result", "data": { "text/plain": [] }, "metadata": {}, "execution_count": 97 } ] }, { "cell_type": "markdown", "source": [ "#### 4.2 Temporary result" ], "metadata": { "id": "DFC0py0Ty_yh" }, "id": "DFC0py0Ty_yh" }, { "cell_type": "code", "source": [ "def handle_query(input_text):\n", " print(\"📥 User input received:\", input_text)\n", "\n", " try:\n", " parsed = parse_user_input(input_text)\n", " print(\"✅ Parsed:\", parsed)\n", "\n", " ref_song = parsed.get(\"reference_song\") or \"\"\n", " if ref_song.strip().lower() not in [\"\", \"...\", \"none\", \"n/a\"]:\n", " results = recommend_by_reference_song(parsed, df_clean, audio_feature_cols, llm, reference_song_prompt)\n", " else:\n", " results = recommend_from_dataframe(parsed, df_clean)\n", "\n", "\n", " results = results.copy()\n", " results[\"Explanation\"] = results.apply(lambda row: generate_explanation(input_text, row), axis=1)\n", " print(\"✅ Final results shape:\", results.shape)\n", "\n", " return pd.DataFrame(results)\n", "\n", " except Exception as e:\n", " print(\"❌ ERROR:\", e)\n", " return pd.DataFrame(columns=[\"Title\", \"Artist\", \"Explanation\"]), pd.DataFrame()" ], "metadata": { "id": "oSchAwEGqt9d" }, "id": "oSchAwEGqt9d", "execution_count": 95, "outputs": [] }, { "cell_type": "code", "source": [ "query = input(\"What kind of song are you looking for? \")\n", "handle_query(query)" ], "metadata": { "id": "FnA7cEgQ0O1Q" }, "id": "FnA7cEgQ0O1Q", "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "handle_query(\"Give me 5 sad songs\")" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "ybZ_JybVqu0o", "outputId": "ae6f2dd7-8474-4a45-a946-b606a1a3c9ac" }, "id": "ybZ_JybVqu0o", "execution_count": 96, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "📥 User input received: Give me 5 sad songs\n", "🧠 Raw LLM Output:\n", " \n", "You are an expert music assistant trained to recommend songs for use in creative projects like ads, short films, social media videos, and campaigns.\n", "\n", "Your job is to extract structured information from the user's input so that we can recommend songs from our database based on Spotify audio features and YouTube metadata.\n", "\n", "Only return the following fields in JSON format:\n", "- \"mood\": overall emotion (e.g., sad, happy, dramatic)\n", "- \"context\": what kind of scene or use (e.g., wedding, breakup scene, brand ad)\n", "- \"preference\": how to sort (e.g., likes, views, popularity)\n", "- \"reference_song\": name of a song the user wants similar songs to\n", "- \"genre\": intended musical style (e.g., acoustic, pop, ambient)\n", "- \"instrumental\": 'yes' if vocals aren't needed, otherwise 'no'\n", "- \"tempo\": slow / medium / fast\n", "- \"artist\": if they want something from a specific artist\n", "- \"gender\": if they prefer male / female vocal\n", "- \"limit\": how many results to show (as a number)\n", "\n", "{\n", " \"mood\": \"...\",\n", " \"context\": \"...\",\n", " \"preference\": \"...\",\n", " \"reference_song\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"...\",\n", " \"limit\": \"...\"\n", "}\n", "\n", "User input: \"Give me 5 sad songs\"\n", "\n", "Respond ONLY with the JSON. Do not explain anything.\n", "\n", "{\n", " \"mood\": \"sad\",\n", " \"context\": \"...\",\n", " \"preference\": \"...\",\n", " \"reference_song\": \"...\",\n", " \"genre\": \"...\",\n", " \"instrumental\": \"...\",\n", " \"tempo\": \"...\",\n", " \"artist\": \"...\",\n", " \"gender\": \"...\",\n", " \"limit\": \"5\"\n", "}\n", "✅ Parsed: {'mood': 'sad', 'context': '...', 'preference': '...', 'reference_song': '...', 'genre': '...', 'instrumental': '...', 'tempo': '...', 'artist': '...', 'gender': '...', 'limit': '5'}\n", "🎵 Total songs before filtering: 19170\n", "🎯 Applied mood → Valence filter: 3971\n", "⚠️ Skipped genre filter due to value or overlap.\n", "⚠️ Skipped instrumental filter (empty or overlap)\n", "⚠️ Skipped tempo filter (empty or overlap)\n", "✅ Final songs returned: 5\n", "✅ Final results shape: (5, 28)\n" ] }, { "output_type": "execute_result", "data": { "text/plain": [ " Artist Url_spotify \\\n", "14580 Charlie Puth https://open.spotify.com/artist/6VuMaDnrHyPL1p... \n", "12469 Wiz Khalifa https://open.spotify.com/artist/137W8MRPWKqSmr... \n", "16668 Alan Walker https://open.spotify.com/artist/7vk5e3vY1uw9pl... \n", "18568 Billie Eilish https://open.spotify.com/artist/6qqNVTkY8uBg9c... \n", "140 Khalid https://open.spotify.com/artist/6LuN9FCkKOj5Pc... \n", "\n", " Track Album \\\n", "14580 See You Again (feat. Charlie Puth) See You Again (feat. Charlie Puth) \n", "12469 See You Again (feat. Charlie Puth) See You Again (feat. Charlie Puth) \n", "16668 Faded Different World \n", "18568 lovely (with Khalid) lovely (with Khalid) \n", "140 lovely (with Khalid) lovely (with Khalid) \n", "\n", " Danceability Energy Key Loudness Speechiness Acousticness \\\n", "14580 0.689 0.481 10.0 -7.503 0.0815 0.3690 \n", "12469 0.689 0.481 10.0 -7.503 0.0815 0.3690 \n", "16668 0.468 0.627 6.0 -5.085 0.0476 0.0281 \n", "18568 0.351 0.296 4.0 -10.109 0.0333 0.9340 \n", "140 0.351 0.296 4.0 -10.109 0.0333 0.9340 \n", "\n", " Instrumentalness Liveness Valence Tempo \\\n", "14580 0.000001 0.0649 0.283 80.025 \n", "12469 0.000001 0.0649 0.283 80.025 \n", "16668 0.000008 0.1100 0.159 179.642 \n", "18568 0.000000 0.0950 0.120 115.284 \n", "140 0.000000 0.0950 0.120 115.284 \n", "\n", " Url_youtube \\\n", "14580 https://www.youtube.com/watch?v=RgKAFK5djSk \n", "12469 https://www.youtube.com/watch?v=RgKAFK5djSk \n", "16668 https://www.youtube.com/watch?v=60ItHLz5WEA \n", "18568 https://www.youtube.com/watch?v=V1Pl8CzNzCw \n", "140 https://www.youtube.com/watch?v=V1Pl8CzNzCw \n", "\n", " Title Channel \\\n", "14580 Wiz Khalifa - See You Again ft. Charlie Puth [... Wiz Khalifa Music \n", "12469 Wiz Khalifa - See You Again ft. Charlie Puth [... Wiz Khalifa Music \n", "16668 Alan Walker - Faded Alan Walker \n", "18568 Billie Eilish, Khalid - lovely BillieEilishVEVO \n", "140 Billie Eilish, Khalid - lovely BillieEilishVEVO \n", "\n", " Views Likes Comments \\\n", "14580 0.714610 0.790485 0.132272 \n", "12469 0.714610 0.790484 0.132272 \n", "16668 0.420902 0.520710 0.077725 \n", "18568 0.213054 0.480938 0.034938 \n", "140 0.213052 0.480931 0.034938 \n", "\n", " Description Licensed \\\n", "14580 Download the new Furious 7 Soundtrack Deluxe V... True \n", "12469 Download the new Furious 7 Soundtrack Deluxe V... True \n", "16668 Click the link to listen to my latest album: \\... True \n", "18568 Listen to “lovely” (with Khalid): http://smart... True \n", "140 Listen to “lovely” (with Khalid): http://smart... True \n", "\n", " official_video Stream \\\n", "14580 True 0.449208 \n", "12469 True 0.449208 \n", "16668 True 0.497022 \n", "18568 True 0.623227 \n", "140 True 0.623227 \n", "\n", " audio_vector Gender similarity \\\n", "14580 [0.283, 0.481, 0.689, 80.025, 0.369, 1.03e-06] male 0.999984 \n", "12469 [0.283, 0.481, 0.689, 80.025, 0.369, 1.03e-06] unknown 0.999984 \n", "16668 [0.159, 0.627, 0.468, 179.642, 0.0281, 7.97e-06] male 0.999987 \n", "18568 [0.12, 0.296, 0.351, 115.284, 0.934, 0.0] female 0.999959 \n", "140 [0.12, 0.296, 0.351, 115.284, 0.934, 0.0] male 0.999959 \n", "\n", " Explanation \n", "14580 This song is a good fit as it is a powerful an... \n", "12469 - Wiz Khalifa's \"See You Again\" is a powerful ... \n", "16668 1. \"Faded\" is a song by Norwegian DJ and recor... \n", "18568 \"lovely\" is a heart-wrenching collaboration be... \n", "140 - \"lovely\" is a song by Billie Eilish and Khal... " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ArtistUrl_spotifyTrackAlbumDanceabilityEnergyKeyLoudnessSpeechinessAcousticnessInstrumentalnessLivenessValenceTempoUrl_youtubeTitleChannelViewsLikesCommentsDescriptionLicensedofficial_videoStreamaudio_vectorGendersimilarityExplanation
14580Charlie Puthhttps://open.spotify.com/artist/6VuMaDnrHyPL1p...See You Again (feat. Charlie Puth)See You Again (feat. Charlie Puth)0.6890.48110.0-7.5030.08150.36900.0000010.06490.28380.025https://www.youtube.com/watch?v=RgKAFK5djSkWiz Khalifa - See You Again ft. Charlie Puth [...Wiz Khalifa Music0.7146100.7904850.132272Download the new Furious 7 Soundtrack Deluxe V...TrueTrue0.449208[0.283, 0.481, 0.689, 80.025, 0.369, 1.03e-06]male0.999984This song is a good fit as it is a powerful an...
12469Wiz Khalifahttps://open.spotify.com/artist/137W8MRPWKqSmr...See You Again (feat. Charlie Puth)See You Again (feat. Charlie Puth)0.6890.48110.0-7.5030.08150.36900.0000010.06490.28380.025https://www.youtube.com/watch?v=RgKAFK5djSkWiz Khalifa - See You Again ft. Charlie Puth [...Wiz Khalifa Music0.7146100.7904840.132272Download the new Furious 7 Soundtrack Deluxe V...TrueTrue0.449208[0.283, 0.481, 0.689, 80.025, 0.369, 1.03e-06]unknown0.999984- Wiz Khalifa's \"See You Again\" is a powerful ...
16668Alan Walkerhttps://open.spotify.com/artist/7vk5e3vY1uw9pl...FadedDifferent World0.4680.6276.0-5.0850.04760.02810.0000080.11000.159179.642https://www.youtube.com/watch?v=60ItHLz5WEAAlan Walker - FadedAlan Walker0.4209020.5207100.077725Click the link to listen to my latest album: \\...TrueTrue0.497022[0.159, 0.627, 0.468, 179.642, 0.0281, 7.97e-06]male0.9999871. \"Faded\" is a song by Norwegian DJ and recor...
18568Billie Eilishhttps://open.spotify.com/artist/6qqNVTkY8uBg9c...lovely (with Khalid)lovely (with Khalid)0.3510.2964.0-10.1090.03330.93400.0000000.09500.120115.284https://www.youtube.com/watch?v=V1Pl8CzNzCwBillie Eilish, Khalid - lovelyBillieEilishVEVO0.2130540.4809380.034938Listen to “lovely” (with Khalid): http://smart...TrueTrue0.623227[0.12, 0.296, 0.351, 115.284, 0.934, 0.0]female0.999959\"lovely\" is a heart-wrenching collaboration be...
140Khalidhttps://open.spotify.com/artist/6LuN9FCkKOj5Pc...lovely (with Khalid)lovely (with Khalid)0.3510.2964.0-10.1090.03330.93400.0000000.09500.120115.284https://www.youtube.com/watch?v=V1Pl8CzNzCwBillie Eilish, Khalid - lovelyBillieEilishVEVO0.2130520.4809310.034938Listen to “lovely” (with Khalid): http://smart...TrueTrue0.623227[0.12, 0.296, 0.351, 115.284, 0.934, 0.0]male0.999959- \"lovely\" is a song by Billie Eilish and Khal...
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe" } }, "metadata": {}, "execution_count": 96 } ] }, { "cell_type": "markdown", "source": [ "### 5 `requirements.txt`" ], "metadata": { "id": "JWRm0QIm3dCE" }, "id": "JWRm0QIm3dCE" }, { "cell_type": "code", "source": [ "requirements = \"\"\"\n", "gradio\n", "pandas\n", "transformers\n", "scikit-learn\n", "accelerate\n", "torch\n", "gender-guesser\n", "\"\"\"\n", "\n", "# Save to Drive\n", "\n", "from google.colab import drive\n", "drive.mount('/content/drive')\n", "\n", "save_path = '/content/drive/MyDrive/mastering-ai/final-project-REA6KIZML-shavira/requirements.txt'\n", "\n", "with open(save_path, \"w\") as f:\n", " f.write(requirements.strip())\n", "\n", "print(f\"✅ requirements.txt saved to: {save_path}\")" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "wKm-Vrav2c17", "outputId": "ae0bddaa-3818-4108-ebca-cc4cd44ca862" }, "id": "wKm-Vrav2c17", "execution_count": 10, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n", "✅ requirements.txt saved to: /content/drive/MyDrive/mastering-ai/final-project-REA6KIZML-shavira/requirements.txt\n" ] } ] }, { "cell_type": "markdown", "id": "2b151c52-20a3-432f-ab16-4721c16581c4", "metadata": { "id": "2b151c52-20a3-432f-ab16-4721c16581c4" }, "source": [ "## Submit Notebook (for submit final project)" ] }, { "cell_type": "code", "execution_count": null, "id": "ced6b581-708f-4758-86ff-3cd51bf14f99", "metadata": { "id": "ced6b581-708f-4758-86ff-3cd51bf14f99" }, "outputs": [], "source": [ "portfolio_link = \"\"\n", "presentation_link = \"\"\n", "\n", "question_id = \"01_portfolio_link\"\n", "submit(student_id, name, assignment_id, str(portfolio_link), question_id, drive_link)\n", "\n", "question_id = \"02_presentation_link\"\n", "submit(student_id, name, assignment_id, str(presentation_link), question_id, drive_link)" ] }, { "cell_type": "markdown", "id": "792aa177-c74e-42e5-9881-40376cd746a8", "metadata": { "id": "792aa177-c74e-42e5-9881-40376cd746a8" }, "source": [ "# FIN" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.11.3" }, "colab": { "provenance": [], "collapsed_sections": [ "2c97aef3-b747-49f7-99e0-4086c03e4200", "LVuOysEiAIoU", "Si8ZBjM1D3vH", "_HloxOGUXNp1", "BAS7vELavO19", "nGw_b_ztvaKm", "DFC0py0Ty_yh" ] }, "widgets": { "application/vnd.jupyter.widget-state+json": { "42c6c5c7d8d747f0acc5cef2b85f3b8d": { "model_module": "@jupyter-widgets/controls", "model_name": "VBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "VBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "VBoxView", "box_style": "", "children": [], "layout": "IPY_MODEL_404a1d3030454d3e84fe6420ebb80091" } }, "b3878fa00e234dffa1a1a920bdb376f6": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_e2a20c52c7a24de6ab0117167e9220d2", "placeholder": "​", "style": "IPY_MODEL_95df421aa38e461d900c2fe880f1cd73", "value": "

Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" } }, "2c3ae2b811c2400c89b0c1d98f4b96ce": { "model_module": "@jupyter-widgets/controls", "model_name": "PasswordModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "PasswordModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "PasswordView", "continuous_update": true, "description": "Token:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_ac3a8af614424efdb8a5994663fd24b8", "placeholder": "​", "style": "IPY_MODEL_a590f9b58bf54673af957562407c5bfd", "value": "" } }, "485559c2895549dfbc009e9c5befa2dc": { "model_module": "@jupyter-widgets/controls", "model_name": "CheckboxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "CheckboxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "CheckboxView", "description": "Add token as git credential?", "description_tooltip": null, "disabled": false, "indent": true, "layout": "IPY_MODEL_988d16d7f27d4c2996dfa245258d5800", "style": "IPY_MODEL_1c2663b8a97a419e942934296ca37259", "value": true } }, "c7223e2ba0e8443fab0958026a3b6568": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ButtonView", "button_style": "", "description": "Login", "disabled": false, "icon": "", "layout": "IPY_MODEL_91c2e50591c347c9a47cfa093402804e", "style": "IPY_MODEL_912b233308ac403081e9f0f87baeb4bb", "tooltip": "" } }, "871962fe50e1448c868965ebccbd2360": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_2bed17aef8ba4c72a99581b8e3140ef3", "placeholder": "​", "style": "IPY_MODEL_2e27c2dbc08444618aa3628a818538a7", "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks.
" } }, "404a1d3030454d3e84fe6420ebb80091": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": "center", "align_self": null, "border": null, "bottom": null, "display": "flex", "flex": null, "flex_flow": "column", "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "50%" } }, "e2a20c52c7a24de6ab0117167e9220d2": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "95df421aa38e461d900c2fe880f1cd73": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "ac3a8af614424efdb8a5994663fd24b8": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "a590f9b58bf54673af957562407c5bfd": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "988d16d7f27d4c2996dfa245258d5800": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "1c2663b8a97a419e942934296ca37259": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "91c2e50591c347c9a47cfa093402804e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "912b233308ac403081e9f0f87baeb4bb": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "button_color": null, "font_weight": "" } }, "2bed17aef8ba4c72a99581b8e3140ef3": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2e27c2dbc08444618aa3628a818538a7": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "6cd05989fbe947b085189c9300261ff0": { "model_module": "@jupyter-widgets/controls", "model_name": "LabelModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_25ab7d781a0a4391b67c9eb04f29394a", "placeholder": "​", "style": "IPY_MODEL_4353881fa6004c4cbd23ccc01e3f70e2", "value": "Connecting..." } }, "25ab7d781a0a4391b67c9eb04f29394a": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "4353881fa6004c4cbd23ccc01e3f70e2": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "9a1d665bd89d4f49bc4981fa4ac1236a": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_e4b7a72480aa48bab8710b0bb72aea42", "IPY_MODEL_150b90af98394460b992168f59aed046", "IPY_MODEL_f5eb1710717549bb805076625a70afda" ], "layout": "IPY_MODEL_ee9fe95478fa4ce99ad8b0148cfb96b4" } }, "e4b7a72480aa48bab8710b0bb72aea42": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_cfe070fd5377493987c8c8de0814b0f2", "placeholder": "​", "style": "IPY_MODEL_cea3898d4a174cf798f9c462c4e0e5bd", "value": "tokenizer_config.json: 100%" } }, "150b90af98394460b992168f59aed046": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_cf2b6c077d7c476b8b8b1ef879266476", "max": 1278, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_25c4cbb720fa4cc09b31dab33bfdc878", "value": 1278 } }, "f5eb1710717549bb805076625a70afda": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_af621e5354394e32b5b53620e62dc34f", "placeholder": "​", "style": "IPY_MODEL_b92e8d4ac49945a8a8545be6ccaf28a8", "value": " 1.28k/1.28k [00:00<00:00, 126kB/s]" } }, "ee9fe95478fa4ce99ad8b0148cfb96b4": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cfe070fd5377493987c8c8de0814b0f2": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cea3898d4a174cf798f9c462c4e0e5bd": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "cf2b6c077d7c476b8b8b1ef879266476": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "25c4cbb720fa4cc09b31dab33bfdc878": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "af621e5354394e32b5b53620e62dc34f": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "b92e8d4ac49945a8a8545be6ccaf28a8": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "680a792647e7462ca1b1b35b86d573f1": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_2ca4f31ffb4f4122879f65fa0708e175", "IPY_MODEL_e35aceb35cf949eaa0fd71ca23eb4af3", "IPY_MODEL_41fe8b225ccb4d3dbbbc1dbbf5deba0b" ], "layout": "IPY_MODEL_f3779425157b4706a53affbbdc238045" } }, "2ca4f31ffb4f4122879f65fa0708e175": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_9a3ecd1abdca4b9fb4bda32a7e94c9ec", "placeholder": "​", "style": "IPY_MODEL_05d9bcb321a749809265e197629c3590", "value": "tokenizer.json: 100%" } }, "e35aceb35cf949eaa0fd71ca23eb4af3": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_abc5e11fc29243df89d11adbe2211159", "max": 4609778, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_2d47a4c572a04bcd916d960c6fa9311c", "value": 4609778 } }, "41fe8b225ccb4d3dbbbc1dbbf5deba0b": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_9fe18571e39645aa9992d8c6c6ba144d", "placeholder": "​", "style": "IPY_MODEL_21e47db051e14cadb718252c23064765", "value": " 4.61M/4.61M [00:00<00:00, 5.07MB/s]" } }, "f3779425157b4706a53affbbdc238045": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "9a3ecd1abdca4b9fb4bda32a7e94c9ec": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "05d9bcb321a749809265e197629c3590": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "abc5e11fc29243df89d11adbe2211159": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2d47a4c572a04bcd916d960c6fa9311c": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "9fe18571e39645aa9992d8c6c6ba144d": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "21e47db051e14cadb718252c23064765": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "b118d74c9d81464bb1797a12cd8cd7a0": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_a239a47473ba495aafbf39e7bd28ead8", "IPY_MODEL_ac8febd7fb0941b284f2a00e65d6a6b8", "IPY_MODEL_c068ecc485824659a42f7ff75e5b47a9" ], "layout": "IPY_MODEL_0dc8bac1ad89451d91f28eb1b6ebe73e" } }, "a239a47473ba495aafbf39e7bd28ead8": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_27e9a354cdb949c7a40491f14e50b476", "placeholder": "​", "style": "IPY_MODEL_aadfe83ed2014839affa5c4e6f0e2880", "value": "config.json: 100%" } }, "ac8febd7fb0941b284f2a00e65d6a6b8": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_93aafa32ce6a4967ad79dc57d6d03e92", "max": 594, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_d854944b51db47d7818e678390dea478", "value": 594 } }, "c068ecc485824659a42f7ff75e5b47a9": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_64365d7622204e1eacb99dd489130cec", "placeholder": "​", "style": "IPY_MODEL_29f3fa3458fd4ccb9f992f1327dc9959", "value": " 594/594 [00:00<00:00, 45.7kB/s]" } }, "0dc8bac1ad89451d91f28eb1b6ebe73e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "27e9a354cdb949c7a40491f14e50b476": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "aadfe83ed2014839affa5c4e6f0e2880": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "93aafa32ce6a4967ad79dc57d6d03e92": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "d854944b51db47d7818e678390dea478": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "64365d7622204e1eacb99dd489130cec": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "29f3fa3458fd4ccb9f992f1327dc9959": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "4eae65223e8f42afac3924285528ed3d": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_0d1f61d9871a473faa899c3d0c4903af", "IPY_MODEL_449c7d837b0f42809a7fa8d5b54a6510", "IPY_MODEL_bcf38e0bea9643768b92959344166535" ], "layout": "IPY_MODEL_0ff7b9f17f5d489ca6afa9ed059fae69" } }, "0d1f61d9871a473faa899c3d0c4903af": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_e7b84cba6f084b52b3ff63d4d1ff387b", "placeholder": "​", "style": "IPY_MODEL_c708a78ad9dc43ca818235bd8ded404e", "value": "pytorch_model.bin.index.json: 100%" } }, "449c7d837b0f42809a7fa8d5b54a6510": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_c555e216335a4a78a9760f85ce601181", "max": 22464, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_a556ee2b5b44457792521483341ef1e0", "value": 22464 } }, "bcf38e0bea9643768b92959344166535": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_bcca0b0e544c4b6ba64cb8ebc7f1d10b", "placeholder": "​", "style": "IPY_MODEL_ba02af9a3a7a4396a792848811dd9b46", "value": " 22.5k/22.5k [00:00<00:00, 1.86MB/s]" } }, "0ff7b9f17f5d489ca6afa9ed059fae69": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e7b84cba6f084b52b3ff63d4d1ff387b": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c708a78ad9dc43ca818235bd8ded404e": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "c555e216335a4a78a9760f85ce601181": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "a556ee2b5b44457792521483341ef1e0": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "bcca0b0e544c4b6ba64cb8ebc7f1d10b": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ba02af9a3a7a4396a792848811dd9b46": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "9f2fe477ffca456389370de8abafabda": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_50b0d4dcf9c343a48357a2467ea08d6c", "IPY_MODEL_a4fa0296c5774ddea795916d252eb8bf", "IPY_MODEL_8f6b4fa2ad144cc9933133d8624f011a" ], "layout": "IPY_MODEL_8d2817ae9537497a96cbe70e60e3e01d" } }, "50b0d4dcf9c343a48357a2467ea08d6c": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_c745ecf1c5684733be42eb031609967f", "placeholder": "​", "style": "IPY_MODEL_d889130f5f0d4f28af482bb88e739e4e", "value": "Fetching 2 files: 100%" } }, "a4fa0296c5774ddea795916d252eb8bf": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_3f579ebbd5bb479fa72acd35c31591bd", "max": 2, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_f0e534e158724d439dbc9a6a47902a10", "value": 2 } }, "8f6b4fa2ad144cc9933133d8624f011a": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_88d02888fc4940f7a5c5f0300608444c", "placeholder": "​", "style": "IPY_MODEL_e8462ce6143447d5a9cd1280ad28ac07", "value": " 2/2 [01:42<00:00, 102.96s/it]" } }, "8d2817ae9537497a96cbe70e60e3e01d": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c745ecf1c5684733be42eb031609967f": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "d889130f5f0d4f28af482bb88e739e4e": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "3f579ebbd5bb479fa72acd35c31591bd": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f0e534e158724d439dbc9a6a47902a10": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "88d02888fc4940f7a5c5f0300608444c": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e8462ce6143447d5a9cd1280ad28ac07": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a4693b72d28f406f94f2d49a7d7fe5f6": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_d5dfbf4106e542c4a159fcb3a08542b0", "IPY_MODEL_1cc61d11b016409eaf1bab7e8e32c27f", "IPY_MODEL_ae18e22f65f74f0caea3508002a393f7" ], "layout": "IPY_MODEL_3b86156841264755a51c8b2abe404815" } }, "d5dfbf4106e542c4a159fcb3a08542b0": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_0daebe467be646a7ac6b4a037260721e", "placeholder": "​", "style": "IPY_MODEL_3363eba32aac41d1b4a7f44abb72a752", "value": "pytorch_model-00001-of-00002.bin: 100%" } }, "1cc61d11b016409eaf1bab7e8e32c27f": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_146a5138a72a43578a34c311b94dacd4", "max": 9968194327, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_cf85eabdefac452387f2e49a4dcff365", "value": 9968194327 } }, "ae18e22f65f74f0caea3508002a393f7": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_9cf127dd638c44c1a5c8778ff299b039", "placeholder": "​", "style": "IPY_MODEL_c9e590aaca35486d88f80f14874da0d6", "value": " 9.97G/9.97G [01:42<00:00, 131MB/s]" } }, "3b86156841264755a51c8b2abe404815": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "0daebe467be646a7ac6b4a037260721e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "3363eba32aac41d1b4a7f44abb72a752": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "146a5138a72a43578a34c311b94dacd4": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cf85eabdefac452387f2e49a4dcff365": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "9cf127dd638c44c1a5c8778ff299b039": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c9e590aaca35486d88f80f14874da0d6": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "6d416ce62cd344b7976d51f8b856cbee": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_fb2668eee44c4000a9357fecb5f5a275", "IPY_MODEL_1dc02174aab74c4893bf26c1bd78eac8", "IPY_MODEL_939194a944fc42ad8f359abd3d387bbf" ], "layout": "IPY_MODEL_b8532246a0ff449eb3af05e736398f1b" } }, "fb2668eee44c4000a9357fecb5f5a275": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_cac2a54e71bd47c1984ae58dbd6e698e", "placeholder": "​", "style": "IPY_MODEL_df3b961259d54ecb8357fbacf1ba9ec2", "value": "pytorch_model-00002-of-00002.bin: 100%" } }, "1dc02174aab74c4893bf26c1bd78eac8": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_bf48ca8be6774c23a0cb93d5e90d2b80", "max": 3852630633, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_356b162d13de4abf8fc1df28dbe9cf65", "value": 3852630633 } }, "939194a944fc42ad8f359abd3d387bbf": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_4cdb55f12c214c959a0cba1a0525847e", "placeholder": "​", "style": "IPY_MODEL_fae8ff9ae8284e289afe68513996e641", "value": " 3.85G/3.85G [00:35<00:00, 177MB/s]" } }, "b8532246a0ff449eb3af05e736398f1b": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cac2a54e71bd47c1984ae58dbd6e698e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "df3b961259d54ecb8357fbacf1ba9ec2": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "bf48ca8be6774c23a0cb93d5e90d2b80": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "356b162d13de4abf8fc1df28dbe9cf65": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "4cdb55f12c214c959a0cba1a0525847e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "fae8ff9ae8284e289afe68513996e641": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "72d365310783454e991820e5419895e1": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_360a8b91d7a944a0b50d9375302a1505", "IPY_MODEL_0abec168dd9f4e3288cbbf4294d03ac1", "IPY_MODEL_09543b7534234fceb0a0e07b7f16e6f2" ], "layout": "IPY_MODEL_67befd09e4804ff99c63fbf9b828dea1" } }, "360a8b91d7a944a0b50d9375302a1505": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_abea7260e9474404a5de81a01be2486e", "placeholder": "​", "style": "IPY_MODEL_59489cbd189b47f681bb6fb8b7c440d6", "value": "model.safetensors.index.json: 100%" } }, "0abec168dd9f4e3288cbbf4294d03ac1": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_e591b27bfad34db6955484a2ad01a8f4", "max": 23567, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_ef09c52b657443818cb1a0c9763899ce", "value": 23567 } }, "09543b7534234fceb0a0e07b7f16e6f2": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_97a94be0499b4882a7558a787220ed76", "placeholder": "​", "style": "IPY_MODEL_6a8a19c6e6e74f5cb1464e33d221d759", "value": " 23.6k/23.6k [00:00<00:00, 577kB/s]" } }, "67befd09e4804ff99c63fbf9b828dea1": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "abea7260e9474404a5de81a01be2486e": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "59489cbd189b47f681bb6fb8b7c440d6": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "e591b27bfad34db6955484a2ad01a8f4": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ef09c52b657443818cb1a0c9763899ce": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "97a94be0499b4882a7558a787220ed76": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "6a8a19c6e6e74f5cb1464e33d221d759": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "1295de688fc34ef09893e568ed04581b": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_03801af6af144e5285520f927c881814", "IPY_MODEL_d2c3e299777745858f8d8c7735313388", "IPY_MODEL_08ae3bf6662b4d47ad29e5018278a56d" ], "layout": "IPY_MODEL_4e778b1404794c4f99fd1c443717ab30" } }, "03801af6af144e5285520f927c881814": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_c31fbbe3fe074cf5bfca525102fbf59d", "placeholder": "​", "style": "IPY_MODEL_f087c7653917486597941f82e520b375", "value": "Loading checkpoint shards: 100%" } }, "d2c3e299777745858f8d8c7735313388": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_4090812b041345f6a8330b3a0f9489d3", "max": 2, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_56ade48cd5b843428cb0c7f28c2e859d", "value": 2 } }, "08ae3bf6662b4d47ad29e5018278a56d": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_bf310238b8f64935992e605272a085a1", "placeholder": "​", "style": "IPY_MODEL_f2155aa56caa42d69fd11975bd3546fa", "value": " 2/2 [01:18<00:00, 36.41s/it]" } }, "4e778b1404794c4f99fd1c443717ab30": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c31fbbe3fe074cf5bfca525102fbf59d": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f087c7653917486597941f82e520b375": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "4090812b041345f6a8330b3a0f9489d3": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "56ade48cd5b843428cb0c7f28c2e859d": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "bf310238b8f64935992e605272a085a1": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f2155aa56caa42d69fd11975bd3546fa": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "4f7e4c31c1b6415c8aba87d0e3bb120d": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_69596ea754a942a09367d46797b50d06", "IPY_MODEL_1b0caef8f7fa4cc5a7e8cb73f3aa07cd", "IPY_MODEL_869d86345ed143fba62d126ddc667e32" ], "layout": "IPY_MODEL_5eedbed4c7134dcdbd1004d1f83a61e2" } }, "69596ea754a942a09367d46797b50d06": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_7a7e00ee6c644a32b5610359d9d6cb6b", "placeholder": "​", "style": "IPY_MODEL_b1cae71eaea847a7b5aed918a5dfe320", "value": "generation_config.json: 100%" } }, "1b0caef8f7fa4cc5a7e8cb73f3aa07cd": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_917ab91bd10b4e1ab7a0dc6226b96a86", "max": 181, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_94a292dfdb084767a733e1660e98f012", "value": 181 } }, "869d86345ed143fba62d126ddc667e32": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_a1aebfb5aa2849b98f64394519d075bf", "placeholder": "​", "style": "IPY_MODEL_e2ffe7492af14f1b9ecec1db292b3965", "value": " 181/181 [00:00<00:00, 11.7kB/s]" } }, "5eedbed4c7134dcdbd1004d1f83a61e2": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "7a7e00ee6c644a32b5610359d9d6cb6b": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "b1cae71eaea847a7b5aed918a5dfe320": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "917ab91bd10b4e1ab7a0dc6226b96a86": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "94a292dfdb084767a733e1660e98f012": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "a1aebfb5aa2849b98f64394519d075bf": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e2ffe7492af14f1b9ecec1db292b3965": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } } } } }, "nbformat": 4, "nbformat_minor": 5 }