NagisaNao commited on
Commit
67e8fdb
·
verified ·
1 Parent(s): a714fc0

rollback...

Browse files
files_cells/notebooks/en/launch_en.ipynb CHANGED
@@ -60,6 +60,7 @@
60
  "ngrok_token = settings['ngrok_token']\n",
61
  "commandline_arguments = settings['commandline_arguments']\n",
62
  "\n",
 
63
  "# ======================== TUNNEL ========================\n",
64
  "if env != \"SageMaker Studio Lab\":\n",
65
  " import cloudpickle as pickle\n",
@@ -94,23 +95,33 @@
94
  "\n",
95
  "if env != \"SageMaker Studio Lab\":\n",
96
  " with tunnel:\n",
 
97
  " %cd {webui_path}\n",
 
98
  " if ngrok_token:\n",
99
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
100
- " commandline_arguments += f\" --port=1101 \" # --encrypt-pass={password}\n",
 
 
 
 
 
 
 
101
  "else:\n",
102
  " if ngrok_token:\n",
103
  " %cd {webui_path}\n",
 
104
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
 
 
 
 
 
 
 
105
  " else:\n",
106
- " print(\"Oops... I think you forgot to insert the token `ngrok`..... go back to widgets and insert it to start webui... no way without it :/\\nYou can get the token here:\\n\\nhttps://dashboard.ngrok.com/get-started/your-authtoken\")\n",
107
- "\n",
108
- "# launch webui\n",
109
- "if env != \"SageMaker Studio Lab\" or ngrok_token:\n",
110
- " !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
111
- " start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())\n",
112
- " time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]\n",
113
- " print(f\"\\n⌚️ \\033[0mYou have been conducting this session for - \\033[33m{time_since_start}\\033[0m\\n\\n\")"
114
  ]
115
  }
116
  ]
 
60
  "ngrok_token = settings['ngrok_token']\n",
61
  "commandline_arguments = settings['commandline_arguments']\n",
62
  "\n",
63
+ "\n",
64
  "# ======================== TUNNEL ========================\n",
65
  "if env != \"SageMaker Studio Lab\":\n",
66
  " import cloudpickle as pickle\n",
 
95
  "\n",
96
  "if env != \"SageMaker Studio Lab\":\n",
97
  " with tunnel:\n",
98
+ " !#python -m http.server 1101\n",
99
  " %cd {webui_path}\n",
100
+ "\n",
101
  " if ngrok_token:\n",
102
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
103
+ " commandline_arguments += f\" --port=1101 \" # --encrypt-pass={password}\n",
104
+ "\n",
105
+ " !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
106
+ "\n",
107
+ " start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())\n",
108
+ " time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]\n",
109
+ " print(f\"\\n⌚️ \\033[0mYou have been conducting this session for - \\033[33m{time_since_start}\\033[0m\\n\\n\")\n",
110
+ "\n",
111
  "else:\n",
112
  " if ngrok_token:\n",
113
  " %cd {webui_path}\n",
114
+ "\n",
115
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
116
+ "\n",
117
+ " !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
118
+ "\n",
119
+ " start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())\n",
120
+ " time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]\n",
121
+ " print(f\"\\n⌚️ \\033[0mYou have been conducting this session for - \\033[33m{time_since_start}\\033[0m\\n\\n\")\n",
122
+ "\n",
123
  " else:\n",
124
+ " print(\"Oops... I think you forgot to insert the token `ngrok`..... go back to widgets and insert it to start webui... no way without it :/\\nYou can get the token here:\\n\\nhttps://dashboard.ngrok.com/get-started/your-authtoken\")"
 
 
 
 
 
 
 
125
  ]
126
  }
127
  ]
files_cells/notebooks/ru/launch_ru.ipynb CHANGED
@@ -60,6 +60,7 @@
60
  "ngrok_token = settings['ngrok_token']\n",
61
  "commandline_arguments = settings['commandline_arguments']\n",
62
  "\n",
 
63
  "# ======================== TUNNEL ========================\n",
64
  "if env != \"SageMaker Studio Lab\":\n",
65
  " import cloudpickle as pickle\n",
@@ -94,23 +95,33 @@
94
  "\n",
95
  "if env != \"SageMaker Studio Lab\":\n",
96
  " with tunnel:\n",
 
97
  " %cd {webui_path}\n",
 
98
  " if ngrok_token:\n",
99
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
100
- " commandline_arguments += f\" --port=1101 \" # --encrypt-pass={password}\n",
 
 
 
 
 
 
 
101
  "else:\n",
102
  " if ngrok_token:\n",
103
  " %cd {webui_path}\n",
 
104
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
 
 
 
 
 
 
 
105
  " else:\n",
106
- " print(\"Упс... Я думаю, вы забыли вставить токен `ngrok`..... вернитесь к виджетам и вставьте его, чтобы запустить webui... без него никак :/\\nВы можете получить токен здесь:\\n\\nhttps://dashboard.ngrok.com/get-started/your-authtoken\")\n",
107
- "\n",
108
- "# launch webui\n",
109
- "if env != \"SageMaker Studio Lab\" or ngrok_token:\n",
110
- " !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
111
- " start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())\n",
112
- " time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]\n",
113
- " print(f\"\\n⌚️ \\033[0mВы проводите эту сессию в течение - \\033[33m{time_since_start}\\033[0m\\n\\n\")"
114
  ]
115
  }
116
  ]
 
60
  "ngrok_token = settings['ngrok_token']\n",
61
  "commandline_arguments = settings['commandline_arguments']\n",
62
  "\n",
63
+ "\n",
64
  "# ======================== TUNNEL ========================\n",
65
  "if env != \"SageMaker Studio Lab\":\n",
66
  " import cloudpickle as pickle\n",
 
95
  "\n",
96
  "if env != \"SageMaker Studio Lab\":\n",
97
  " with tunnel:\n",
98
+ " !#python -m http.server 1101\n",
99
  " %cd {webui_path}\n",
100
+ "\n",
101
  " if ngrok_token:\n",
102
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
103
+ " commandline_arguments += f\" --port=1101 \" # --encrypt-pass={password}\n",
104
+ "\n",
105
+ " !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
106
+ "\n",
107
+ " start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())\n",
108
+ " time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]\n",
109
+ " print(f\"\\n⌚️ \\033[0mВы проводите эту сессию в течение - \\033[33m{time_since_start}\\033[0m\\n\\n\")\n",
110
+ "\n",
111
  "else:\n",
112
  " if ngrok_token:\n",
113
  " %cd {webui_path}\n",
114
+ "\n",
115
  " commandline_arguments += ' --ngrok ' + ngrok_token\n",
116
+ "\n",
117
+ " !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
118
+ "\n",
119
+ " start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())\n",
120
+ " time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]\n",
121
+ " print(f\"\\n⌚️ \\033[0mВы проводите эту сессию в течение - \\033[33m{time_since_start}\\033[0m\\n\\n\")\n",
122
+ "\n",
123
  " else:\n",
124
+ " print(\"Упс... Я думаю, вы забыли вставить токен `ngrok`..... вернитесь к виджетам и вставьте его, чтобы запустить webui... без него никак :/\\nВы можете получить токен здесь:\\n\\nhttps://dashboard.ngrok.com/get-started/your-authtoken\")"
 
 
 
 
 
 
 
125
  ]
126
  }
127
  ]
files_cells/python/en/launch_en.py CHANGED
@@ -42,6 +42,7 @@ settings = load_settings()
42
  ngrok_token = settings['ngrok_token']
43
  commandline_arguments = settings['commandline_arguments']
44
 
 
45
  # ======================== TUNNEL ========================
46
  if env != "SageMaker Studio Lab":
47
  import cloudpickle as pickle
@@ -76,21 +77,31 @@ get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash"
76
 
77
  if env != "SageMaker Studio Lab":
78
  with tunnel:
 
79
  get_ipython().run_line_magic('cd', '{webui_path}')
 
80
  if ngrok_token:
81
  commandline_arguments += ' --ngrok ' + ngrok_token
82
- commandline_arguments += f" --port=1101 " # --encrypt-pass={password}
 
 
 
 
 
 
 
83
  else:
84
  if ngrok_token:
85
  get_ipython().run_line_magic('cd', '{webui_path}')
 
86
  commandline_arguments += ' --ngrok ' + ngrok_token
 
 
 
 
 
 
 
87
  else:
88
  print("Oops... I think you forgot to insert the token `ngrok`..... go back to widgets and insert it to start webui... no way without it :/\nYou can get the token here:\n\nhttps://dashboard.ngrok.com/get-started/your-authtoken")
89
 
90
- # launch webui
91
- if env != "SageMaker Studio Lab" or ngrok_token:
92
- get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
93
- start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())
94
- time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]
95
- print(f"\n⌚️ \033[0mYou have been conducting this session for - \033[33m{time_since_start}\033[0m\n\n")
96
-
 
42
  ngrok_token = settings['ngrok_token']
43
  commandline_arguments = settings['commandline_arguments']
44
 
45
+
46
  # ======================== TUNNEL ========================
47
  if env != "SageMaker Studio Lab":
48
  import cloudpickle as pickle
 
77
 
78
  if env != "SageMaker Studio Lab":
79
  with tunnel:
80
+ get_ipython().system('#python -m http.server 1101')
81
  get_ipython().run_line_magic('cd', '{webui_path}')
82
+
83
  if ngrok_token:
84
  commandline_arguments += ' --ngrok ' + ngrok_token
85
+ commandline_arguments += f" --port=1101 " # --encrypt-pass={password}
86
+
87
+ get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
88
+
89
+ start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())
90
+ time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]
91
+ print(f"\n⌚️ \033[0mYou have been conducting this session for - \033[33m{time_since_start}\033[0m\n\n")
92
+
93
  else:
94
  if ngrok_token:
95
  get_ipython().run_line_magic('cd', '{webui_path}')
96
+
97
  commandline_arguments += ' --ngrok ' + ngrok_token
98
+
99
+ get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
100
+
101
+ start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())
102
+ time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]
103
+ print(f"\n⌚️ \033[0mYou have been conducting this session for - \033[33m{time_since_start}\033[0m\n\n")
104
+
105
  else:
106
  print("Oops... I think you forgot to insert the token `ngrok`..... go back to widgets and insert it to start webui... no way without it :/\nYou can get the token here:\n\nhttps://dashboard.ngrok.com/get-started/your-authtoken")
107
 
 
 
 
 
 
 
 
files_cells/python/ru/launch_ru.py CHANGED
@@ -42,6 +42,7 @@ settings = load_settings()
42
  ngrok_token = settings['ngrok_token']
43
  commandline_arguments = settings['commandline_arguments']
44
 
 
45
  # ======================== TUNNEL ========================
46
  if env != "SageMaker Studio Lab":
47
  import cloudpickle as pickle
@@ -76,21 +77,31 @@ get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash"
76
 
77
  if env != "SageMaker Studio Lab":
78
  with tunnel:
 
79
  get_ipython().run_line_magic('cd', '{webui_path}')
 
80
  if ngrok_token:
81
  commandline_arguments += ' --ngrok ' + ngrok_token
82
- commandline_arguments += f" --port=1101 " # --encrypt-pass={password}
 
 
 
 
 
 
 
83
  else:
84
  if ngrok_token:
85
  get_ipython().run_line_magic('cd', '{webui_path}')
 
86
  commandline_arguments += ' --ngrok ' + ngrok_token
 
 
 
 
 
 
 
87
  else:
88
  print("Упс... Я думаю, вы забыли вставить токен `ngrok`..... вернитесь к виджетам и вставьте его, чтобы запустить webui... без него никак :/\nВы можете получить токен здесь:\n\nhttps://dashboard.ngrok.com/get-started/your-authtoken")
89
 
90
- # launch webui
91
- if env != "SageMaker Studio Lab" or ngrok_token:
92
- get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
93
- start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())
94
- time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]
95
- print(f"\n⌚️ \033[0mВы проводите эту сессию в течение - \033[33m{time_since_start}\033[0m\n\n")
96
-
 
42
  ngrok_token = settings['ngrok_token']
43
  commandline_arguments = settings['commandline_arguments']
44
 
45
+
46
  # ======================== TUNNEL ========================
47
  if env != "SageMaker Studio Lab":
48
  import cloudpickle as pickle
 
77
 
78
  if env != "SageMaker Studio Lab":
79
  with tunnel:
80
+ get_ipython().system('#python -m http.server 1101')
81
  get_ipython().run_line_magic('cd', '{webui_path}')
82
+
83
  if ngrok_token:
84
  commandline_arguments += ' --ngrok ' + ngrok_token
85
+ commandline_arguments += f" --port=1101 " # --encrypt-pass={password}
86
+
87
+ get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
88
+
89
+ start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())
90
+ time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]
91
+ print(f"\n⌚️ \033[0mВы проводите эту сессию в течение - \033[33m{time_since_start}\033[0m\n\n")
92
+
93
  else:
94
  if ngrok_token:
95
  get_ipython().run_line_magic('cd', '{webui_path}')
96
+
97
  commandline_arguments += ' --ngrok ' + ngrok_token
98
+
99
+ get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
100
+
101
+ start_colab = float(open(f'{webui_path}/static/colabTimer.txt', 'r').read())
102
+ time_since_start = str(timedelta(seconds=time.time()-start_colab)).split('.')[0]
103
+ print(f"\n⌚️ \033[0mВы проводите эту сессию в течение - \033[33m{time_since_start}\033[0m\n\n")
104
+
105
  else:
106
  print("Упс... Я думаю, вы забыли вставить токен `ngrok`..... вернитесь к виджетам и вставьте его, чтобы запустить webui... без него никак :/\nВы можете получить токен здесь:\n\nhttps://dashboard.ngrok.com/get-started/your-authtoken")
107