NagisaNao commited on
Commit
da4d50a
1 Parent(s): f7bf136

Removed the transparency args (I don't know how to fix this...)

Browse files
files_cells/notebooks/en/downloading_en.ipynb CHANGED
@@ -88,7 +88,7 @@
88
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
89
  "\n",
90
  " if env == \"Google Colab\":\n",
91
- " !pip install -q pip install xformers==0.0.26.dev778 -U\n",
92
  " else:\n",
93
  " !pip install -q {torch} -U\n",
94
  " !pip install -q {xformers} -U\n",
 
88
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
89
  "\n",
90
  " if env == \"Google Colab\":\n",
91
+ " !pip install xformers==0.0.25 --no-deps\n",
92
  " else:\n",
93
  " !pip install -q {torch} -U\n",
94
  " !pip install -q {xformers} -U\n",
files_cells/notebooks/en/widgets_en.ipynb CHANGED
@@ -48,7 +48,7 @@
48
  "\n",
49
  "\n",
50
  "# ==================== CSS JS ====================\n",
51
- "# custom background images (test)\n",
52
  "import argparse\n",
53
  "parser = argparse.ArgumentParser(description='This script processes an background image.')\n",
54
  "parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')\n",
@@ -58,15 +58,20 @@
58
  "parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)\n",
59
  "parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)\n",
60
  "parser.add_argument('-m', '--mode', type=str, help='Specify \"no-repeat\" so that the image pattern is not repeated.', metavar='', default='repeat')\n",
61
- "parser.add_argument('-t', '--transparent', action='store_true', help='Flag to exclude z-index from CSS. Makes fields transparent')\n",
62
  "args = parser.parse_args()\n",
63
- "# ---\n",
64
- "url_img, opacity_img, blur_img, y_img, x_img, scale_img, mode_img = args.image, args.opacity, args.blur, args.y, args.x, args.scale, args.mode\n",
 
 
 
 
 
 
65
  "\n",
66
  "# WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?\n",
67
- "fix_heigh_img = \"-780px\"\n",
68
- "if env == \"Google Colab\": # betrayal..\n",
69
- " fix_heigh_img = \"-740px\"\n",
70
  "\n",
71
  "container_background = f'''\n",
72
  "<style>\n",
@@ -80,20 +85,8 @@
80
  " --img_mode: {mode_img};\n",
81
  " --img_height_dif: {fix_heigh_img}\n",
82
  "}}\n",
83
- "\n",
84
- ".widget-dropdown select,\n",
85
- ".widget-text input[type=\"text\"] {{\n",
86
- " height: 30px;\n",
87
- " background-color: #1c1c1c;\n",
88
- " border: 1px solid #262626;\n",
89
- " border-radius: 10px;\n",
90
- " box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);\n",
91
- " transition: all 0.3s ease-in-out;\n",
92
  "'''\n",
93
  "\n",
94
- "if not args.transparent:\n",
95
- " container_background += \" z-index: 1;\\n</style>\\n\"\n",
96
- "\n",
97
  "display(HTML(container_background))\n",
98
  "# ---\n",
99
  "\n",
@@ -148,32 +141,33 @@
148
  "\n",
149
  "/* background img */\n",
150
  ".container::before {\n",
151
- " content: \"\";\n",
152
- " position: absolute;\n",
153
- " top: 0;\n",
154
- " left: 0;\n",
155
- " right: 0;\n",
156
- " bottom: 0;\n",
157
- " background-image: var(--img_background);\n",
158
- " background-size: var(--img_scale);\n",
159
- " background-repeat: var(--img_mode);\n",
160
- " opacity: var(--img_opacity);\n",
161
- " mix-blend-mode: screen;\n",
162
- " pointer-events: none;\n",
163
- " filter: blur(var(--img_blur));\n",
 
164
  "}\n",
165
  "\n",
166
  ".image_1::before {\n",
167
- " background-position: var(--image_x) calc(-120px - var(--image_y));\n",
168
  "}\n",
169
  ".image_2::before {\n",
170
- " background-position: var(--image_x) calc(-290px - var(--image_y));\n",
171
  "}\n",
172
  ".image_3::before {\n",
173
- " background-position: var(--image_x) calc(-430px - var(--image_y));\n",
174
  "}\n",
175
  ".image_4::before {\n",
176
- " background-position: var(--image_x) calc(var(--img_height_dif) - var(--image_y));\n",
177
  "}\n",
178
  "\n",
179
  ".container_custom_downlad {\n",
@@ -207,7 +201,7 @@
207
  "\n",
208
  "\n",
209
  "/* Input field styles */\n",
210
- "/*\n",
211
  ".widget-dropdown select,\n",
212
  ".widget-text input[type=\"text\"] {\n",
213
  " height: 30px;\n",
@@ -217,7 +211,6 @@
217
  " box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);\n",
218
  " transition: all 0.3s ease-in-out;\n",
219
  "}\n",
220
- "*/\n",
221
  "\n",
222
  ".widget-dropdown select:focus,\n",
223
  ".widget-text input[type=\"text\"]:focus {\n",
 
48
  "\n",
49
  "\n",
50
  "# ==================== CSS JS ====================\n",
51
+ "# custom background images V1.1\n",
52
  "import argparse\n",
53
  "parser = argparse.ArgumentParser(description='This script processes an background image.')\n",
54
  "parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')\n",
 
58
  "parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)\n",
59
  "parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)\n",
60
  "parser.add_argument('-m', '--mode', type=str, help='Specify \"no-repeat\" so that the image pattern is not repeated.', metavar='', default='repeat')\n",
 
61
  "args = parser.parse_args()\n",
62
+ "\"\"\"---\"\"\"\n",
63
+ "url_img = args.image\n",
64
+ "opacity_img = args.opacity\n",
65
+ "blur_img = args.blur\n",
66
+ "y_img = args.y\n",
67
+ "x_img = args.x\n",
68
+ "scale_img = args.scale\n",
69
+ "mode_img = args.mode\n",
70
  "\n",
71
  "# WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?\n",
72
+ "fix_heigh_img = \"-850px\"\n",
73
+ "if env == \"Google Colab\":\n",
74
+ " fix_heigh_img = \"-775px\" # -810px - full widgets\n",
75
  "\n",
76
  "container_background = f'''\n",
77
  "<style>\n",
 
85
  " --img_mode: {mode_img};\n",
86
  " --img_height_dif: {fix_heigh_img}\n",
87
  "}}\n",
 
 
 
 
 
 
 
 
 
88
  "'''\n",
89
  "\n",
 
 
 
90
  "display(HTML(container_background))\n",
91
  "# ---\n",
92
  "\n",
 
141
  "\n",
142
  "/* background img */\n",
143
  ".container::before {\n",
144
+ " content: \"\";\n",
145
+ " position: absolute;\n",
146
+ " top: 0;\n",
147
+ " left: 0;\n",
148
+ " right: 0;\n",
149
+ " bottom: 0;\n",
150
+ " background-image: var(--img_background);\n",
151
+ " background-size: var(--img_scale);\n",
152
+ " background-repeat: var(--img_mode);\n",
153
+ " opacity: var(--img_opacity);\n",
154
+ " mix-blend-mode: screen;\n",
155
+ " pointer-events: none;\n",
156
+ " filter: blur(var(--img_blur));\n",
157
+ " z-index: -1;\n",
158
  "}\n",
159
  "\n",
160
  ".image_1::before {\n",
161
+ " background-position: var(--image_x) calc(-120px - var(--image_y));\n",
162
  "}\n",
163
  ".image_2::before {\n",
164
+ " background-position: var(--image_x) calc(-290px - var(--image_y));\n",
165
  "}\n",
166
  ".image_3::before {\n",
167
+ " background-position: var(--image_x) calc(-430px - var(--image_y));\n",
168
  "}\n",
169
  ".image_4::before {\n",
170
+ " background-position: var(--image_x) calc(var(--img_height_dif) - var(--image_y));\n",
171
  "}\n",
172
  "\n",
173
  ".container_custom_downlad {\n",
 
201
  "\n",
202
  "\n",
203
  "/* Input field styles */\n",
204
+ "\n",
205
  ".widget-dropdown select,\n",
206
  ".widget-text input[type=\"text\"] {\n",
207
  " height: 30px;\n",
 
211
  " box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);\n",
212
  " transition: all 0.3s ease-in-out;\n",
213
  "}\n",
 
214
  "\n",
215
  ".widget-dropdown select:focus,\n",
216
  ".widget-text input[type=\"text\"]:focus {\n",
files_cells/notebooks/ru/downloading_ru.ipynb CHANGED
@@ -88,7 +88,7 @@
88
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
89
  "\n",
90
  " if env == \"Google Colab\":\n",
91
- " !pip install -q pip install xformers==0.0.26.dev778 -U\n",
92
  " else:\n",
93
  " !pip install -q {torch} -U\n",
94
  " !pip install -q {xformers} -U\n",
 
88
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
89
  "\n",
90
  " if env == \"Google Colab\":\n",
91
+ " !pip install xformers==0.0.25 --no-deps\n",
92
  " else:\n",
93
  " !pip install -q {torch} -U\n",
94
  " !pip install -q {xformers} -U\n",
files_cells/notebooks/ru/widgets_ru.ipynb CHANGED
@@ -48,7 +48,7 @@
48
  "\n",
49
  "\n",
50
  "# ==================== CSS JS ====================\n",
51
- "# custom background images (test)\n",
52
  "import argparse\n",
53
  "parser = argparse.ArgumentParser(description='This script processes an background image.')\n",
54
  "parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')\n",
@@ -58,15 +58,20 @@
58
  "parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)\n",
59
  "parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)\n",
60
  "parser.add_argument('-m', '--mode', type=str, help='Specify \"no-repeat\" so that the image pattern is not repeated.', metavar='', default='repeat')\n",
61
- "parser.add_argument('-t', '--transparent', action='store_true', help='Flag to exclude z-index from CSS. Makes fields transparent')\n",
62
  "args = parser.parse_args()\n",
63
- "# ---\n",
64
- "url_img, opacity_img, blur_img, y_img, x_img, scale_img, mode_img = args.image, args.opacity, args.blur, args.y, args.x, args.scale, args.mode\n",
 
 
 
 
 
 
65
  "\n",
66
  "# WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?\n",
67
- "fix_heigh_img = \"-780px\"\n",
68
- "if env == \"Google Colab\": # betrayal..\n",
69
- " fix_heigh_img = \"-740px\"\n",
70
  "\n",
71
  "container_background = f'''\n",
72
  "<style>\n",
@@ -80,20 +85,8 @@
80
  " --img_mode: {mode_img};\n",
81
  " --img_height_dif: {fix_heigh_img}\n",
82
  "}}\n",
83
- "\n",
84
- ".widget-dropdown select,\n",
85
- ".widget-text input[type=\"text\"] {{\n",
86
- " height: 30px;\n",
87
- " background-color: #1c1c1c;\n",
88
- " border: 1px solid #262626;\n",
89
- " border-radius: 10px;\n",
90
- " box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);\n",
91
- " transition: all 0.3s ease-in-out;\n",
92
  "'''\n",
93
  "\n",
94
- "if not args.transparent:\n",
95
- " container_background += \" z-index: 1;\\n</style>\\n\"\n",
96
- "\n",
97
  "display(HTML(container_background))\n",
98
  "# ---\n",
99
  "\n",
@@ -161,6 +154,7 @@
161
  " mix-blend-mode: screen;\n",
162
  " pointer-events: none;\n",
163
  " filter: blur(var(--img_blur));\n",
 
164
  "}\n",
165
  "\n",
166
  ".image_1::before {\n",
@@ -207,7 +201,7 @@
207
  "\n",
208
  "\n",
209
  "/* Input field styles */\n",
210
- "/*\n",
211
  ".widget-dropdown select,\n",
212
  ".widget-text input[type=\"text\"] {\n",
213
  " height: 30px;\n",
@@ -217,7 +211,6 @@
217
  " box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);\n",
218
  " transition: all 0.3s ease-in-out;\n",
219
  "}\n",
220
- "*/\n",
221
  "\n",
222
  ".widget-dropdown select:focus,\n",
223
  ".widget-text input[type=\"text\"]:focus {\n",
 
48
  "\n",
49
  "\n",
50
  "# ==================== CSS JS ====================\n",
51
+ "# custom background images V1.1\n",
52
  "import argparse\n",
53
  "parser = argparse.ArgumentParser(description='This script processes an background image.')\n",
54
  "parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')\n",
 
58
  "parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)\n",
59
  "parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)\n",
60
  "parser.add_argument('-m', '--mode', type=str, help='Specify \"no-repeat\" so that the image pattern is not repeated.', metavar='', default='repeat')\n",
 
61
  "args = parser.parse_args()\n",
62
+ "\"\"\"---\"\"\"\n",
63
+ "url_img = args.image\n",
64
+ "opacity_img = args.opacity\n",
65
+ "blur_img = args.blur\n",
66
+ "y_img = args.y\n",
67
+ "x_img = args.x\n",
68
+ "scale_img = args.scale\n",
69
+ "mode_img = args.mode\n",
70
  "\n",
71
  "# WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?\n",
72
+ "fix_heigh_img = \"-850px\"\n",
73
+ "if env == \"Google Colab\":\n",
74
+ " fix_heigh_img = \"-775px\" # -810px - full widgets\n",
75
  "\n",
76
  "container_background = f'''\n",
77
  "<style>\n",
 
85
  " --img_mode: {mode_img};\n",
86
  " --img_height_dif: {fix_heigh_img}\n",
87
  "}}\n",
 
 
 
 
 
 
 
 
 
88
  "'''\n",
89
  "\n",
 
 
 
90
  "display(HTML(container_background))\n",
91
  "# ---\n",
92
  "\n",
 
154
  " mix-blend-mode: screen;\n",
155
  " pointer-events: none;\n",
156
  " filter: blur(var(--img_blur));\n",
157
+ " z-index: -1;\n",
158
  "}\n",
159
  "\n",
160
  ".image_1::before {\n",
 
201
  "\n",
202
  "\n",
203
  "/* Input field styles */\n",
204
+ "\n",
205
  ".widget-dropdown select,\n",
206
  ".widget-text input[type=\"text\"] {\n",
207
  " height: 30px;\n",
 
211
  " box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);\n",
212
  " transition: all 0.3s ease-in-out;\n",
213
  "}\n",
 
214
  "\n",
215
  ".widget-dropdown select:focus,\n",
216
  ".widget-text input[type=\"text\"]:focus {\n",
files_cells/python/en/downloading_en.py CHANGED
@@ -69,7 +69,7 @@ if not os.path.exists(flag_file):
69
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
70
 
71
  if env == "Google Colab":
72
- get_ipython().system('pip install -q pip install xformers==0.0.26.dev778 -U')
73
  else:
74
  get_ipython().system('pip install -q {torch} -U')
75
  get_ipython().system('pip install -q {xformers} -U')
 
69
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
70
 
71
  if env == "Google Colab":
72
+ get_ipython().system('pip install xformers==0.0.25 --no-deps')
73
  else:
74
  get_ipython().system('pip install -q {torch} -U')
75
  get_ipython().system('pip install -q {xformers} -U')
files_cells/python/en/widgets_en.py CHANGED
@@ -29,7 +29,7 @@ get_ipython().system('mkdir -p {root_path}')
29
 
30
 
31
  # ==================== CSS JS ====================
32
- # custom background images (test)
33
  import argparse
34
  parser = argparse.ArgumentParser(description='This script processes an background image.')
35
  parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')
@@ -39,15 +39,20 @@ parser.add_argument('-y', type=int, help='Y coordinate for the image in px', met
39
  parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)
40
  parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)
41
  parser.add_argument('-m', '--mode', type=str, help='Specify "no-repeat" so that the image pattern is not repeated.', metavar='', default='repeat')
42
- parser.add_argument('-t', '--transparent', action='store_true', help='Flag to exclude z-index from CSS. Makes fields transparent')
43
  args = parser.parse_args()
44
- # ---
45
- url_img, opacity_img, blur_img, y_img, x_img, scale_img, mode_img = args.image, args.opacity, args.blur, args.y, args.x, args.scale, args.mode
 
 
 
 
 
 
46
 
47
  # WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?
48
- fix_heigh_img = "-780px"
49
- if env == "Google Colab": # betrayal..
50
- fix_heigh_img = "-740px"
51
 
52
  container_background = f'''
53
  <style>
@@ -61,20 +66,8 @@ container_background = f'''
61
  --img_mode: {mode_img};
62
  --img_height_dif: {fix_heigh_img}
63
  }}
64
-
65
- .widget-dropdown select,
66
- .widget-text input[type="text"] {{
67
- height: 30px;
68
- background-color: #1c1c1c;
69
- border: 1px solid #262626;
70
- border-radius: 10px;
71
- box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
72
- transition: all 0.3s ease-in-out;
73
  '''
74
 
75
- if not args.transparent:
76
- container_background += " z-index: 1;\n</style>\n"
77
-
78
  display(HTML(container_background))
79
  # ---
80
 
@@ -129,32 +122,33 @@ a {
129
 
130
  /* background img */
131
  .container::before {
132
- content: "";
133
- position: absolute;
134
- top: 0;
135
- left: 0;
136
- right: 0;
137
- bottom: 0;
138
- background-image: var(--img_background);
139
- background-size: var(--img_scale);
140
- background-repeat: var(--img_mode);
141
- opacity: var(--img_opacity);
142
- mix-blend-mode: screen;
143
- pointer-events: none;
144
- filter: blur(var(--img_blur));
 
145
  }
146
 
147
  .image_1::before {
148
- background-position: var(--image_x) calc(-120px - var(--image_y));
149
  }
150
  .image_2::before {
151
- background-position: var(--image_x) calc(-290px - var(--image_y));
152
  }
153
  .image_3::before {
154
- background-position: var(--image_x) calc(-430px - var(--image_y));
155
  }
156
  .image_4::before {
157
- background-position: var(--image_x) calc(var(--img_height_dif) - var(--image_y));
158
  }
159
 
160
  .container_custom_downlad {
@@ -188,7 +182,7 @@ a {
188
 
189
 
190
  /* Input field styles */
191
- /*
192
  .widget-dropdown select,
193
  .widget-text input[type="text"] {
194
  height: 30px;
@@ -198,7 +192,6 @@ a {
198
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
199
  transition: all 0.3s ease-in-out;
200
  }
201
- */
202
 
203
  .widget-dropdown select:focus,
204
  .widget-text input[type="text"]:focus {
 
29
 
30
 
31
  # ==================== CSS JS ====================
32
+ # custom background images V1.1
33
  import argparse
34
  parser = argparse.ArgumentParser(description='This script processes an background image.')
35
  parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')
 
39
  parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)
40
  parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)
41
  parser.add_argument('-m', '--mode', type=str, help='Specify "no-repeat" so that the image pattern is not repeated.', metavar='', default='repeat')
 
42
  args = parser.parse_args()
43
+ """---"""
44
+ url_img = args.image
45
+ opacity_img = args.opacity
46
+ blur_img = args.blur
47
+ y_img = args.y
48
+ x_img = args.x
49
+ scale_img = args.scale
50
+ mode_img = args.mode
51
 
52
  # WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?
53
+ fix_heigh_img = "-850px"
54
+ if env == "Google Colab":
55
+ fix_heigh_img = "-775px" # -810px - full widgets
56
 
57
  container_background = f'''
58
  <style>
 
66
  --img_mode: {mode_img};
67
  --img_height_dif: {fix_heigh_img}
68
  }}
 
 
 
 
 
 
 
 
 
69
  '''
70
 
 
 
 
71
  display(HTML(container_background))
72
  # ---
73
 
 
122
 
123
  /* background img */
124
  .container::before {
125
+ content: "";
126
+ position: absolute;
127
+ top: 0;
128
+ left: 0;
129
+ right: 0;
130
+ bottom: 0;
131
+ background-image: var(--img_background);
132
+ background-size: var(--img_scale);
133
+ background-repeat: var(--img_mode);
134
+ opacity: var(--img_opacity);
135
+ mix-blend-mode: screen;
136
+ pointer-events: none;
137
+ filter: blur(var(--img_blur));
138
+ z-index: -1;
139
  }
140
 
141
  .image_1::before {
142
+ background-position: var(--image_x) calc(-120px - var(--image_y));
143
  }
144
  .image_2::before {
145
+ background-position: var(--image_x) calc(-290px - var(--image_y));
146
  }
147
  .image_3::before {
148
+ background-position: var(--image_x) calc(-430px - var(--image_y));
149
  }
150
  .image_4::before {
151
+ background-position: var(--image_x) calc(var(--img_height_dif) - var(--image_y));
152
  }
153
 
154
  .container_custom_downlad {
 
182
 
183
 
184
  /* Input field styles */
185
+
186
  .widget-dropdown select,
187
  .widget-text input[type="text"] {
188
  height: 30px;
 
192
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
193
  transition: all 0.3s ease-in-out;
194
  }
 
195
 
196
  .widget-dropdown select:focus,
197
  .widget-text input[type="text"]:focus {
files_cells/python/ru/downloading_ru.py CHANGED
@@ -69,7 +69,7 @@ if not os.path.exists(flag_file):
69
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
70
 
71
  if env == "Google Colab":
72
- get_ipython().system('pip install -q pip install xformers==0.0.26.dev778 -U')
73
  else:
74
  get_ipython().system('pip install -q {torch} -U')
75
  get_ipython().system('pip install -q {xformers} -U')
 
69
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
70
 
71
  if env == "Google Colab":
72
+ get_ipython().system('pip install xformers==0.0.25 --no-deps')
73
  else:
74
  get_ipython().system('pip install -q {torch} -U')
75
  get_ipython().system('pip install -q {xformers} -U')
files_cells/python/ru/widgets_ru.py CHANGED
@@ -29,7 +29,7 @@ get_ipython().system('mkdir -p {root_path}')
29
 
30
 
31
  # ==================== CSS JS ====================
32
- # custom background images (test)
33
  import argparse
34
  parser = argparse.ArgumentParser(description='This script processes an background image.')
35
  parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')
@@ -39,15 +39,20 @@ parser.add_argument('-y', type=int, help='Y coordinate for the image in px', met
39
  parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)
40
  parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)
41
  parser.add_argument('-m', '--mode', type=str, help='Specify "no-repeat" so that the image pattern is not repeated.', metavar='', default='repeat')
42
- parser.add_argument('-t', '--transparent', action='store_true', help='Flag to exclude z-index from CSS. Makes fields transparent')
43
  args = parser.parse_args()
44
- # ---
45
- url_img, opacity_img, blur_img, y_img, x_img, scale_img, mode_img = args.image, args.opacity, args.blur, args.y, args.x, args.scale, args.mode
 
 
 
 
 
 
46
 
47
  # WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?
48
- fix_heigh_img = "-780px"
49
- if env == "Google Colab": # betrayal..
50
- fix_heigh_img = "-740px"
51
 
52
  container_background = f'''
53
  <style>
@@ -61,20 +66,8 @@ container_background = f'''
61
  --img_mode: {mode_img};
62
  --img_height_dif: {fix_heigh_img}
63
  }}
64
-
65
- .widget-dropdown select,
66
- .widget-text input[type="text"] {{
67
- height: 30px;
68
- background-color: #1c1c1c;
69
- border: 1px solid #262626;
70
- border-radius: 10px;
71
- box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
72
- transition: all 0.3s ease-in-out;
73
  '''
74
 
75
- if not args.transparent:
76
- container_background += " z-index: 1;\n</style>\n"
77
-
78
  display(HTML(container_background))
79
  # ---
80
 
@@ -142,6 +135,7 @@ a {
142
  mix-blend-mode: screen;
143
  pointer-events: none;
144
  filter: blur(var(--img_blur));
 
145
  }
146
 
147
  .image_1::before {
@@ -188,7 +182,7 @@ a {
188
 
189
 
190
  /* Input field styles */
191
- /*
192
  .widget-dropdown select,
193
  .widget-text input[type="text"] {
194
  height: 30px;
@@ -198,7 +192,6 @@ a {
198
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
199
  transition: all 0.3s ease-in-out;
200
  }
201
- */
202
 
203
  .widget-dropdown select:focus,
204
  .widget-text input[type="text"]:focus {
 
29
 
30
 
31
  # ==================== CSS JS ====================
32
+ # custom background images V1.1
33
  import argparse
34
  parser = argparse.ArgumentParser(description='This script processes an background image.')
35
  parser.add_argument('-i', '--image', type=str, help='URL of the image to process', metavar='')
 
39
  parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)
40
  parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)
41
  parser.add_argument('-m', '--mode', type=str, help='Specify "no-repeat" so that the image pattern is not repeated.', metavar='', default='repeat')
 
42
  args = parser.parse_args()
43
+ """---"""
44
+ url_img = args.image
45
+ opacity_img = args.opacity
46
+ blur_img = args.blur
47
+ y_img = args.y
48
+ x_img = args.x
49
+ scale_img = args.scale
50
+ mode_img = args.mode
51
 
52
  # WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?
53
+ fix_heigh_img = "-850px"
54
+ if env == "Google Colab":
55
+ fix_heigh_img = "-775px" # -810px - full widgets
56
 
57
  container_background = f'''
58
  <style>
 
66
  --img_mode: {mode_img};
67
  --img_height_dif: {fix_heigh_img}
68
  }}
 
 
 
 
 
 
 
 
 
69
  '''
70
 
 
 
 
71
  display(HTML(container_background))
72
  # ---
73
 
 
135
  mix-blend-mode: screen;
136
  pointer-events: none;
137
  filter: blur(var(--img_blur));
138
+ z-index: -1;
139
  }
140
 
141
  .image_1::before {
 
182
 
183
 
184
  /* Input field styles */
185
+
186
  .widget-dropdown select,
187
  .widget-text input[type="text"] {
188
  height: 30px;
 
192
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
193
  transition: all 0.3s ease-in-out;
194
  }
 
195
 
196
  .widget-dropdown select:focus,
197
  .widget-text input[type="text"]:focus {