{ "cells": [ { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import json\n", "import random" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "<>:1: SyntaxWarning: invalid escape sequence '\\c'\n", "<>:3: SyntaxWarning: invalid escape sequence '\\d'\n", "<>:1: SyntaxWarning: invalid escape sequence '\\c'\n", "<>:3: SyntaxWarning: invalid escape sequence '\\d'\n", "C:\\Users\\rajst\\AppData\\Local\\Temp\\ipykernel_11856\\1444736939.py:1: SyntaxWarning: invalid escape sequence '\\c'\n", " image_data=pd.read_csv(\"data_set_formation\\custom_prompts_df.csv\")\n", "C:\\Users\\rajst\\AppData\\Local\\Temp\\ipykernel_11856\\1444736939.py:3: SyntaxWarning: invalid escape sequence '\\d'\n", " with open(\"data_set_formation\\data.json\") as read:\n" ] } ], "source": [ "image_data=pd.read_csv(\"data_set_formation\\custom_prompts_df.csv\")\n", "\n", "with open(\"data_set_formation\\data.json\") as read:\n", " text_data=json.load(read)\n", "# prompt_data=" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | prompt | \n", "image_file | \n", "
---|---|---|
0 | \n", "painting of King Henry VIII carrying an umbrella | \n", "images/0/custom_0_0.png | \n", "
1 | \n", "Fox Mulder and a chinchilla walking down a roa... | \n", "images/0/custom_1_0.png | \n", "
2 | \n", "photo of a gas burner by a soft pretzel | \n", "images/0/custom_2_0.png | \n", "
3 | \n", "photo of Shyster standing street lights on at ... | \n", "images/0/custom_3_0.png | \n", "
4 | \n", "cute young man eating a plant over a fence in ... | \n", "images/0/custom_5_0.png | \n", "
... | \n", "... | \n", "... | \n", "
99995 | \n", "photo of a natural kite at Westminster Abbey | \n", "images/102/custom_102419_0.png | \n", "
99996 | \n", "smooth rum with a clock in the style of a digi... | \n", "images/102/custom_102420_0.png | \n", "
99997 | \n", "a lovable elephant by the Gamla Stan, Stockholm | \n", "images/102/custom_102421_0.png | \n", "
99998 | \n", "photo of Courtney Love with a hot dog | \n", "images/102/custom_102422_0.png | \n", "
99999 | \n", "Maniac jumping on a skateboard near a fence | \n", "images/102/custom_102423_0.png | \n", "
100000 rows × 2 columns
\n", "\n", " | prompt | \n", "label | \n", "
---|---|---|
0 | \n", "generate a beautiful sunset over the ocean. | \n", "image | \n", "
1 | \n", "create a futuristic cityscape at night. | \n", "image | \n", "
2 | \n", "show a cozy cabin in the middle of a snowy for... | \n", "image | \n", "
3 | \n", "draw a tropical beach with palm trees and clea... | \n", "image | \n", "
4 | \n", "design a medieval castle on a hilltop. | \n", "image | \n", "
... | \n", "... | \n", "... | \n", "
40035 | \n", "i was watching a documentary and it spoke of s... | \n", "text | \n", "
40036 | \n", "should i buy a dslr or a new phone for photogr... | \n", "text | \n", "
40037 | \n", "okay, i see. so it depends on how serious i am... | \n", "text | \n", "
40038 | \n", "it is just to take photos of my family | \n", "text | \n", "
40039 | \n", "is there any topical treatment i can apply to ... | \n", "text | \n", "
40040 rows × 2 columns
\n", "