|
@@ -9,7 +9,7 @@
|
|
"\n",
|
|
"\n",
|
|
"To make the experience consistent, we will use [this link]() for getting access to our dataset. To credit, thanks to the author [here]() for making it available. \n",
|
|
"To make the experience consistent, we will use [this link]() for getting access to our dataset. To credit, thanks to the author [here]() for making it available. \n",
|
|
"\n",
|
|
"\n",
|
|
- "The author of this series empathises with all Kagglers aspiring to be Grandmasters: Please upvote the dataset version on Kaggle if you enjoy this course."
|
|
|
|
|
|
+ "As thanks to original author-Please upvote the dataset version on Kaggle if you enjoy this course."
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -43,7 +43,7 @@
|
|
"\n",
|
|
"\n",
|
|
"Let's first download the dataset and set our variables to point to it. \n",
|
|
"Let's first download the dataset and set our variables to point to it. \n",
|
|
"\n",
|
|
"\n",
|
|
- "Remember, this is something you will change, don't rush the shift+enter fingers yet! It will come soon!"
|
|
|
|
|
|
+ "Remember, this is something you will change, don't rush the shift+enter fingers yet! Please also set your hf-token in the line below"
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -72,7 +72,7 @@
|
|
"\n",
|
|
"\n",
|
|
"- PIL: For handling images to be passed to our Llama model\n",
|
|
"- PIL: For handling images to be passed to our Llama model\n",
|
|
"- Huggingface Tranformers: For running the model\n",
|
|
"- Huggingface Tranformers: For running the model\n",
|
|
- "- Concurrent Library: Because 405B suggested its useful for speedups and we want to look smart when doing OS stuff :) "
|
|
|
|
|
|
+ "- Concurrent Library: To look smart when doing OS stuff by using concurrency :) "
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -362,9 +362,7 @@
|
|
{
|
|
{
|
|
"cell_type": "markdown",
|
|
"cell_type": "markdown",
|
|
"id": "db3d7f11-e5d2-49e3-a607-188f2f43379c",
|
|
"id": "db3d7f11-e5d2-49e3-a607-188f2f43379c",
|
|
- "metadata": {
|
|
|
|
- "jp-MarkdownHeadingCollapsed": true
|
|
|
|
- },
|
|
|
|
|
|
+ "metadata": {},
|
|
"source": [
|
|
"source": [
|
|
"## EDA\n",
|
|
"## EDA\n",
|
|
"\n",
|
|
"\n",
|
|
@@ -1137,48 +1135,15 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"cell_type": "code",
|
|
"cell_type": "code",
|
|
- "execution_count": 30,
|
|
|
|
- "id": "1de59227-6042-441b-a1f8-b19ce83f7c45",
|
|
|
|
- "metadata": {},
|
|
|
|
- "outputs": [],
|
|
|
|
- "source": [
|
|
|
|
- "USER_TEXT = \"\"\"\n",
|
|
|
|
- "You are an expert fashion captioner, we are writing descriptions of clothes, look at the image closely and write a caption for it.\n",
|
|
|
|
- "\n",
|
|
|
|
- "Write the following Title, Size, Category, Gender, Type, Description in JSON FORMAT, PLEASE DO NOT FORGET JSON, I WILL BE VERY SAD AND CRY\n",
|
|
|
|
- "\n",
|
|
|
|
- "ALSO START WITH THE JSON AND NOT ANY THING ELSE, FIRST CHAR IN YOUR RESPONSE IS ITS OPENING BRACE, I WILL DRINK CHAI IF YOU FOLLOW THIS\n",
|
|
|
|
- "\n",
|
|
|
|
- "FOLLOW THESE STEPS CLOSELY WHEN WRITING THE CAPTION: \n",
|
|
|
|
- "1. Only start your response with a dictionary like the example below, nothing else, I NEED TO PARSE IT LATER, SO DONT ADD ANYTHING ELSE-IT WILL BREAK MY CODE AND I WILL BE VERY SAD \n",
|
|
|
|
- "Remember-DO NOT SAY ANYTHING ELSE ABOUT WHAT IS GOING ON, just the opening brace is the first thing in your response nothing else ok?\n",
|
|
|
|
- "2. REMEMBER TO CLOSE THE DICTIONARY WITH '}'BRACE, IT GOES AFTER THE END OF DESCRIPTION-YOU ALWAYS FORGET IT, THIS WILL CAUSE A FIRE ON A PRODUCTION SERVER BEING USE BY MILLIONS\n",
|
|
|
|
- "3. If you cant tell the size from image, guess it! its okay but dont literally write that you guessed it\n",
|
|
|
|
- "4. Do not make the caption very literal, all of these are product photos, DO NOT CAPTION HOW OR WHERE THEY ARE PLACED, FOCUS ON WRITING ABOUT THE PIECE OF CLOTHING\n",
|
|
|
|
- "5. BE CREATIVE WITH THE DESCRIPTION BUT FOLLOW EVERYTHING CLOSELY FOR STRUCTURE\n",
|
|
|
|
- "6. Return your answer in dictionary format, see the example below\n",
|
|
|
|
- "7. Please do NOT add new lines or tabs in the JSON\n",
|
|
|
|
- "8. I REPEAT DO NOT GIVE ME YOUR EXPLAINATION START WITH THE JSON\n",
|
|
|
|
- "\n",
|
|
|
|
- "{\"Title\": \"Title of item of clothing\", \"Size\": {'S', 'M', 'L', 'XL'}, #select one randomly if you cant tell from the image. DO NOT TELL ME YOU ESTIMATE OR GUESSED IT ONLY THE LETTER IS ENOUGH\", Category\": {T-Shirt, Shoes, Tops, Pants, Jeans, Shorts, Skirts, Shoes, Footwear}, \"Gender\": {M, F, U}, \"Type\": {Casual, Formal, Work Casual, Lounge}, \"Description\": \"Write it here\"}\n",
|
|
|
|
- "\n",
|
|
|
|
- "Example: ALWAYS RETURN ANSWERS IN THE DICTIONARY FORMAT BELOW OK?\n",
|
|
|
|
- "\n",
|
|
|
|
- "{\"Title\": \"Casual White pant with logo on it\", \"size\": \"L\", \"Category\": \"Jeans\", \"Gender\": \"U\", \"Type\": \"Work Casual\", \"Description\": \"Write it here, this is where your stuff goes\"} \n",
|
|
|
|
- "\"\"\""
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "cell_type": "code",
|
|
|
|
"execution_count": 34,
|
|
"execution_count": 34,
|
|
"id": "ab307328-ad5e-436e-a3d5-30bfb8e24a34",
|
|
"id": "ab307328-ad5e-436e-a3d5-30bfb8e24a34",
|
|
"metadata": {},
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"outputs": [],
|
|
"source": [
|
|
"source": [
|
|
- "USER_TEXT_OPTION_2 = \"\"\"\n",
|
|
|
|
|
|
+ "USER_TEXT_OPTION = \"\"\"\n",
|
|
"You are an expert fashion captioner, we are writing descriptions of clothes, look at the image closely and write a caption for it.\n",
|
|
"You are an expert fashion captioner, we are writing descriptions of clothes, look at the image closely and write a caption for it.\n",
|
|
"\n",
|
|
"\n",
|
|
- "Write the following Title, Size, Category, Gender, Type, Description in JSON FORMAT, PLEASE DO NOT FORGET JSON,\n",
|
|
|
|
|
|
+ "Write the following Title, Size, Category, Gender, Type, Description in JSON FORMAT, PLEASE DO NOT FORGET JSON, \n",
|
|
"\n",
|
|
"\n",
|
|
"ALSO START WITH THE JSON AND NOT ANY THING ELSE, FIRST CHAR IN YOUR RESPONSE IS ITS OPENING BRACE\n",
|
|
"ALSO START WITH THE JSON AND NOT ANY THING ELSE, FIRST CHAR IN YOUR RESPONSE IS ITS OPENING BRACE\n",
|
|
"\n",
|
|
"\n",
|
|
@@ -1793,7 +1758,7 @@
|
|
"name": "python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"pygments_lexer": "ipython3",
|
|
- "version": "3.12.5"
|
|
|
|
|
|
+ "version": "3.11.10"
|
|
}
|
|
}
|
|
},
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat": 4,
|