Update webui.py
Browse files
webui.py
CHANGED
|
@@ -3,15 +3,13 @@ from __future__ import annotations
|
|
| 3 |
import os
|
| 4 |
import time
|
| 5 |
import pycloudflare
|
|
|
|
| 6 |
|
| 7 |
from modules import timer
|
| 8 |
from modules import initialize_util
|
| 9 |
from modules import initialize
|
| 10 |
|
| 11 |
#ngrok穿透
|
| 12 |
-
port = ""
|
| 13 |
-
address_name = ""
|
| 14 |
-
should_run = ""
|
| 15 |
ngrok_use = True
|
| 16 |
ngrokTokenFile='/root/main/Authtoken.txt' # 非必填 存放ngrokToken的文件的路径
|
| 17 |
|
|
@@ -35,7 +33,7 @@ def ngrok_start(ngrokTokenFile: str, port: int, address_name: str, should_run: b
|
|
| 35 |
else:
|
| 36 |
print('skip start ngrok')
|
| 37 |
|
| 38 |
-
ngrok_start()
|
| 39 |
|
| 40 |
startup_timer = timer.startup_timer
|
| 41 |
startup_timer.record("launcher")
|
|
|
|
| 3 |
import os
|
| 4 |
import time
|
| 5 |
import pycloudflare
|
| 6 |
+
import pyngrok
|
| 7 |
|
| 8 |
from modules import timer
|
| 9 |
from modules import initialize_util
|
| 10 |
from modules import initialize
|
| 11 |
|
| 12 |
#ngrok穿透
|
|
|
|
|
|
|
|
|
|
| 13 |
ngrok_use = True
|
| 14 |
ngrokTokenFile='/root/main/Authtoken.txt' # 非必填 存放ngrokToken的文件的路径
|
| 15 |
|
|
|
|
| 33 |
else:
|
| 34 |
print('skip start ngrok')
|
| 35 |
|
| 36 |
+
ngrok_start(ngrokTokenFile,7860,'',ngrok_use)
|
| 37 |
|
| 38 |
startup_timer = timer.startup_timer
|
| 39 |
startup_timer.record("launcher")
|