Spaces:
Sleeping
Sleeping
TraeBot commited on
Commit ·
b1a08b2
1
Parent(s): 2ae9e73
limit max content length and UI upgrade
Browse files
app.py
CHANGED
|
@@ -32,6 +32,7 @@ class CustomFlask(Flask):
|
|
| 32 |
|
| 33 |
app = CustomFlask(__name__, static_folder='static', template_folder='templates')
|
| 34 |
ensure_dirs()
|
|
|
|
| 35 |
|
| 36 |
|
| 37 |
# ---------- Data Utilities ----------
|
|
@@ -212,4 +213,3 @@ def api_segment():
|
|
| 212 |
if __name__ == '__main__':
|
| 213 |
port = int(os.environ.get('PORT', 7860))
|
| 214 |
app.run(host='0.0.0.0', port=port)
|
| 215 |
-
|
|
|
|
| 32 |
|
| 33 |
app = CustomFlask(__name__, static_folder='static', template_folder='templates')
|
| 34 |
ensure_dirs()
|
| 35 |
+
app.config['MAX_CONTENT_LENGTH'] = 5 * 1024 * 1024
|
| 36 |
|
| 37 |
|
| 38 |
# ---------- Data Utilities ----------
|
|
|
|
| 213 |
if __name__ == '__main__':
|
| 214 |
port = int(os.environ.get('PORT', 7860))
|
| 215 |
app.run(host='0.0.0.0', port=port)
|
|
|