Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
#!/usr/bin/env python3
|
| 2 |
import json
|
| 3 |
-
import os
|
| 4 |
-
|
| 5 |
import sys
|
| 6 |
import os
|
| 7 |
import io
|
|
@@ -19,8 +17,7 @@ from PIL import Image
|
|
| 19 |
from restoration import *
|
| 20 |
from flask import Flask, request, jsonify, make_response
|
| 21 |
from waitress import serve
|
| 22 |
-
|
| 23 |
-
os.environ["MPLCONFIGDIR"] = "/tmp/matplotlib"
|
| 24 |
LOG_LEVEL = logging.DEBUG
|
| 25 |
TMP_PATH = '/tmp/inswapper'
|
| 26 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
@@ -83,7 +80,7 @@ def get_args():
|
|
| 83 |
'-p', '--port',
|
| 84 |
help='Port to listen on',
|
| 85 |
type=int,
|
| 86 |
-
default=
|
| 87 |
)
|
| 88 |
|
| 89 |
parser.add_argument(
|
|
@@ -559,4 +556,4 @@ if __name__ == '__main__':
|
|
| 559 |
app,
|
| 560 |
host=args.host,
|
| 561 |
port=args.port
|
| 562 |
-
)
|
|
|
|
| 1 |
#!/usr/bin/env python3
|
| 2 |
import json
|
|
|
|
|
|
|
| 3 |
import sys
|
| 4 |
import os
|
| 5 |
import io
|
|
|
|
| 17 |
from restoration import *
|
| 18 |
from flask import Flask, request, jsonify, make_response
|
| 19 |
from waitress import serve
|
| 20 |
+
|
|
|
|
| 21 |
LOG_LEVEL = logging.DEBUG
|
| 22 |
TMP_PATH = '/tmp/inswapper'
|
| 23 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
| 80 |
'-p', '--port',
|
| 81 |
help='Port to listen on',
|
| 82 |
type=int,
|
| 83 |
+
default=80
|
| 84 |
)
|
| 85 |
|
| 86 |
parser.add_argument(
|
|
|
|
| 556 |
app,
|
| 557 |
host=args.host,
|
| 558 |
port=args.port
|
| 559 |
+
)
|