yangtb24 commited on
Commit
313605b
·
verified ·
1 Parent(s): 1d68708

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -17
app.py CHANGED
@@ -1,15 +1,4 @@
1
- import os
2
- import time
3
- import logging
4
- import requests
5
- from requests.adapters import HTTPAdapter
6
- from requests.packages.urllib3.util.retry import Retry
7
- import json
8
- import uuid
9
- import concurrent.futures
10
- import threading
11
- import base64
12
- import io
13
  from io import BytesIO
14
  from itertools import chain
15
  from PIL import Image
@@ -17,6 +6,8 @@ from datetime import datetime
17
  from apscheduler.schedulers.background import BackgroundScheduler
18
  from flask import Flask, request, jsonify, Response, stream_with_context
19
  from werkzeug.middleware.proxy_fix import ProxyFix
 
 
20
 
21
  os.environ['TZ'] = 'Asia/Shanghai'
22
  time.tzset()
@@ -1192,8 +1183,4 @@ if __name__ == '__main__':
1192
  refresh_models()
1193
  logging.info("首次刷新模型列表已手动触发执行")
1194
 
1195
- app.run(
1196
- debug=False,
1197
- host='0.0.0.0',
1198
- port=int(os.environ.get('PORT', 7860))
1199
- )
 
1
+ import os,time,logging,requests,json,uuid,concurrent.futures,threading,base64,io
 
 
 
 
 
 
 
 
 
 
 
2
  from io import BytesIO
3
  from itertools import chain
4
  from PIL import Image
 
6
  from apscheduler.schedulers.background import BackgroundScheduler
7
  from flask import Flask, request, jsonify, Response, stream_with_context
8
  from werkzeug.middleware.proxy_fix import ProxyFix
9
+ from requests.adapters import HTTPAdapter
10
+ from requests.packages.urllib3.util.retry import Retry
11
 
12
  os.environ['TZ'] = 'Asia/Shanghai'
13
  time.tzset()
 
1183
  refresh_models()
1184
  logging.info("首次刷新模型列表已手动触发执行")
1185
 
1186
+ app.run(debug=False,host='0.0.0.0',port=int(os.environ.get('PORT', 7860)))