ideepankarsharma2003 commited on
Commit
27d916b
·
0 Parent(s):

added initial commit

Browse files
.gitattributes ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ /files.txt filter=lfs diff=lfs merge=lfs -text
2
+ /image.png filter=lfs diff=lfs merge=lfs -text
3
+ /trials_01.ipynb filter=lfs diff=lfs merge=lfs -text
4
+ /trials_02_creating_url_list.ipynb filter=lfs diff=lfs merge=lfs -text
5
+ /urls.json filter=lfs diff=lfs merge=lfs -text
files.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a4132141bf6e5f13c213f65e37a554d967989a762b1f5ae3be836b2c73517bb
3
+ size 14576067
image.png ADDED

Git LFS Details

  • SHA256: 1130aa3d95a6c031f080e8df68e9cad0ca322b6704a8e5917b734ae96f43d791
  • Pointer size: 131 Bytes
  • Size of remote file: 941 kB
trials_01.ipynb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21c4d00db1efec16212d70c0bf559537be591f042c2e6888c0ba250bac124aea
3
+ size 809956
trials_02_creating_url_list.ipynb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0259cb943c1abd5ec779c6910eb46f5914a8f857c569a00bea9e6b3fa81389cf
3
+ size 14784030
trials_03_setting_up_images.ipynb ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "import os; os.chdir('..')"
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "code",
14
+ "execution_count": 2,
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "os.mkdir(\"ai_gen_images\")"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": 3,
24
+ "metadata": {},
25
+ "outputs": [
26
+ {
27
+ "data": {
28
+ "text/plain": [
29
+ "['https://cdn.discordapp.com/attachments/988028621421686834/988592559897059378/ac325c7f-b984-454a-bb62-e41dcd3fd5b6_StevenMertens_Bill_Sienkiewicz_technology__Jack_Kirby_machines__retro_futuristic_ghibli_matte_painting.png',\n",
30
+ " 'https://cdn.discordapp.com/attachments/986263515713110056/988592330741252166/2735cb78-3bbe-419a-905c-c5e91dbed653_Erkan_Cerit_None.png',\n",
31
+ " 'https://cdn.discordapp.com/attachments/988028621421686834/988592225803993118/a278dac1-035b-47e3-a4b2-f168ec626b51_StevenMertens_Bill_Sienkiewicz_technology__Jack_Kirby_machines__retro_futuristic_ghibli_matte_painting.png',\n",
32
+ " 'https://cdn.discordapp.com/attachments/988028621421686834/988592214944907274/86e8ee74-05a3-48ce-9895-0be954752673_StevenMertens_Bill_Sienkiewicz_technology__Jack_Kirby_machines__retro_futuristic_ghibli_matte_painting.png',\n",
33
+ " 'https://cdn.discordapp.com/attachments/982990243621908480/988592166035140608/f191002c-0f09-4139-a38e-64beba3e7084_MissTwistedRose_cats_with_many_eyes_floating_in_colorful_glowing_swirling_whisps_occult_inspired_emerging_from_the_v.png']"
34
+ ]
35
+ },
36
+ "execution_count": 3,
37
+ "metadata": {},
38
+ "output_type": "execute_result"
39
+ }
40
+ ],
41
+ "source": [
42
+ "import json\n",
43
+ "\n",
44
+ "urls= json.load(open(\"research/urls.json\"))\n",
45
+ "urls[:5]"
46
+ ]
47
+ },
48
+ {
49
+ "cell_type": "code",
50
+ "execution_count": 4,
51
+ "metadata": {},
52
+ "outputs": [
53
+ {
54
+ "data": {
55
+ "text/plain": [
56
+ "250133"
57
+ ]
58
+ },
59
+ "execution_count": 4,
60
+ "metadata": {},
61
+ "output_type": "execute_result"
62
+ }
63
+ ],
64
+ "source": [
65
+ "len(urls)"
66
+ ]
67
+ },
68
+ {
69
+ "cell_type": "code",
70
+ "execution_count": 5,
71
+ "metadata": {},
72
+ "outputs": [
73
+ {
74
+ "name": "stderr",
75
+ "output_type": "stream",
76
+ "text": [
77
+ " 0%| | 538/250133 [12:30<63:33:24, 1.09it/s] "
78
+ ]
79
+ },
80
+ {
81
+ "name": "stdout",
82
+ "output_type": "stream",
83
+ "text": [
84
+ "https://cdn.discordapp.com/attachments/986263515713110056/988550187028975637/4ce72f57-6f4f-48ca-8509-ab9099823029_Erkan_Cerit_None.png\n"
85
+ ]
86
+ },
87
+ {
88
+ "name": "stderr",
89
+ "output_type": "stream",
90
+ "text": [
91
+ " 0%| | 548/250133 [12:41<61:42:38, 1.12it/s] "
92
+ ]
93
+ }
94
+ ],
95
+ "source": [
96
+ "from tqdm import tqdm\n",
97
+ "import requests\n",
98
+ "i=0\n",
99
+ "\n",
100
+ "\n",
101
+ "for url in tqdm(urls):\n",
102
+ " filename= f\"ai_gen_images/image_{i}.png\"\n",
103
+ " i+=1\n",
104
+ " try:\n",
105
+ " response= requests.get(url)\n",
106
+ " if response.ok:\n",
107
+ " with open(filename, \"wb\") as f:\n",
108
+ " f.write(response.content)\n",
109
+ " else:\n",
110
+ " print(\"response not ok: \", url)\n",
111
+ "\n",
112
+ " except:\n",
113
+ " print(url)\n"
114
+ ]
115
+ },
116
+ {
117
+ "cell_type": "code",
118
+ "execution_count": null,
119
+ "metadata": {},
120
+ "outputs": [],
121
+ "source": []
122
+ }
123
+ ],
124
+ "metadata": {
125
+ "kernelspec": {
126
+ "display_name": "Python 3",
127
+ "language": "python",
128
+ "name": "python3"
129
+ },
130
+ "language_info": {
131
+ "codemirror_mode": {
132
+ "name": "ipython",
133
+ "version": 3
134
+ },
135
+ "file_extension": ".py",
136
+ "mimetype": "text/x-python",
137
+ "name": "python",
138
+ "nbconvert_exporter": "python",
139
+ "pygments_lexer": "ipython3",
140
+ "version": "3.9.6"
141
+ }
142
+ },
143
+ "nbformat": 4,
144
+ "nbformat_minor": 2
145
+ }
urls.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1de442365ccac785ca9e810bb8121903ffda65448c31fa2b40aded9a089c5867
3
+ size 49704756