Update server.py
Browse files
server.py
CHANGED
|
@@ -7,6 +7,9 @@ import os
|
|
| 7 |
import time
|
| 8 |
import json
|
| 9 |
from IPython.display import clear_output
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
huggiingface_repo_id = 'Qi28/SD_QZ' # Hugging Face 数据集 ID
|
|
@@ -201,10 +204,8 @@ def check_api1():
|
|
| 201 |
except requests.exceptions.Timeout as e:
|
| 202 |
print(f"接口异常2: {e}")
|
| 203 |
if frp_status:
|
| 204 |
-
print("启动FRP")
|
| 205 |
threading.Thread(target=Frpc, daemon=True).start()
|
| 206 |
if nps_status:
|
| 207 |
-
print("启动NPS")
|
| 208 |
threading.Thread(target=NPS, daemon=True).start()
|
| 209 |
# threading.Thread(target=run_script).start()
|
| 210 |
#threading.Thread(target=run_commands).start()
|
|
@@ -213,10 +214,8 @@ def check_api1():
|
|
| 213 |
except requests.exceptions.RequestException as e:
|
| 214 |
print(f"接口异常3: {e}")
|
| 215 |
if frp_status:
|
| 216 |
-
print("启动FRP")
|
| 217 |
threading.Thread(target=Frpc, daemon=True).start()
|
| 218 |
if nps_status:
|
| 219 |
-
print("启动NPS")
|
| 220 |
threading.Thread(target=NPS, daemon=True).start()
|
| 221 |
# threading.Thread(target=run_script).start()
|
| 222 |
#threading.Thread(target=run_commands).start()
|
|
|
|
| 7 |
import time
|
| 8 |
import json
|
| 9 |
from IPython.display import clear_output
|
| 10 |
+
from requests.adapters import HTTPAdapter
|
| 11 |
+
from requests.packages.urllib3.util.retry import Retry
|
| 12 |
+
|
| 13 |
|
| 14 |
|
| 15 |
huggiingface_repo_id = 'Qi28/SD_QZ' # Hugging Face 数据集 ID
|
|
|
|
| 204 |
except requests.exceptions.Timeout as e:
|
| 205 |
print(f"接口异常2: {e}")
|
| 206 |
if frp_status:
|
|
|
|
| 207 |
threading.Thread(target=Frpc, daemon=True).start()
|
| 208 |
if nps_status:
|
|
|
|
| 209 |
threading.Thread(target=NPS, daemon=True).start()
|
| 210 |
# threading.Thread(target=run_script).start()
|
| 211 |
#threading.Thread(target=run_commands).start()
|
|
|
|
| 214 |
except requests.exceptions.RequestException as e:
|
| 215 |
print(f"接口异常3: {e}")
|
| 216 |
if frp_status:
|
|
|
|
| 217 |
threading.Thread(target=Frpc, daemon=True).start()
|
| 218 |
if nps_status:
|
|
|
|
| 219 |
threading.Thread(target=NPS, daemon=True).start()
|
| 220 |
# threading.Thread(target=run_script).start()
|
| 221 |
#threading.Thread(target=run_commands).start()
|