ACCA225 commited on
Commit
08fb7c1
1 Parent(s): bd4c40f

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +4 -2
app2.py CHANGED
@@ -234,8 +234,10 @@ def monitor_gpu():
234
 
235
  time.sleep(60)
236
  def zrok():
 
237
  pass
238
  def start():
 
239
  #try:
240
  # print('启动proxy')
241
  # threading.Thread(target = localProxy,daemon=True).start()
@@ -248,8 +250,8 @@ def start():
248
  #time.sleep(5)
249
 
250
  command = "python launch.py --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle"
251
- command1 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7862 --ngrok-region=jp --ngrok=2bgXLjjKFvxfbuZFlR2NMZkvL8n_4WrK7f15FLtWb8p7v3oaF"
252
- command2 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7863 --ngrok-region=jp --ngrok=2CXyNlT9xGfFoL5ruI6hQV20FNq_7tbmuzS9RtyNTkyEe1J6C"
253
  process = subprocess.Popen(command, shell=True)
254
  time.sleep(250)
255
  process = subprocess.Popen(command1, shell=True)
 
234
 
235
  time.sleep(60)
236
  def zrok():
237
+ #不可用
238
  pass
239
  def start():
240
+ os.system("pip install pyngrok")
241
  #try:
242
  # print('启动proxy')
243
  # threading.Thread(target = localProxy,daemon=True).start()
 
250
  #time.sleep(5)
251
 
252
  command = "python launch.py --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle"
253
+ command1 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7862 & ngrok http 7862 --authtoken=2bgnVJhlLqxUZhS1WyeaAtQA12F_6nQXrapUved4QSxYFn1cD"
254
+ command2 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7863 & ngrok http 7863 --authtoken=2CXyNlT9xGfFoL5ruI6hQV20FNq_7tbmuzS9RtyNTkyEe1J6C"
255
  process = subprocess.Popen(command, shell=True)
256
  time.sleep(250)
257
  process = subprocess.Popen(command1, shell=True)