Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,19 @@ import boto3
|
|
| 13 |
import s3fs
|
| 14 |
import os
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# Define output directory
|
| 17 |
output_dir = Path.cwd() / "output"
|
| 18 |
output_dir.mkdir(exist_ok=True)
|
|
|
|
| 13 |
import s3fs
|
| 14 |
import os
|
| 15 |
|
| 16 |
+
# Change the maximum file upload size
|
| 17 |
+
import streamlit.report_thread as ReportThread
|
| 18 |
+
from streamlit.server.server import Server
|
| 19 |
+
|
| 20 |
+
def limit_max_upload_size():
|
| 21 |
+
max_upload_size = 25 * 1024 * 1024 * 1024 # 25 GB
|
| 22 |
+
server = Server.get_current()
|
| 23 |
+
if server is not None:
|
| 24 |
+
server._max_upload_size = max_upload_size
|
| 25 |
+
ReportThread.add_close_callback(server._uploaded_file_mgr.clear_upload_folder)
|
| 26 |
+
|
| 27 |
+
limit_max_upload_size()
|
| 28 |
+
|
| 29 |
# Define output directory
|
| 30 |
output_dir = Path.cwd() / "output"
|
| 31 |
output_dir.mkdir(exist_ok=True)
|