Spaces:
Running
Running
Update app_environment.py
Browse files- app_environment.py +6 -1
app_environment.py
CHANGED
|
@@ -33,4 +33,9 @@ def remove_session_directory(directory, root):
|
|
| 33 |
|
| 34 |
|
| 35 |
def hosted_download_limit():
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
def hosted_download_limit():
|
| 36 |
+
if not hosted_mode():
|
| 37 |
+
return None
|
| 38 |
+
gigabytes = int(os.environ.get('TOKEN_VISUALISER_MAX_DOWNLOAD_GB', '16'))
|
| 39 |
+
if gigabytes < 1:
|
| 40 |
+
raise ValueError('TOKEN_VISUALISER_MAX_DOWNLOAD_GB must be a positive integer.')
|
| 41 |
+
return gigabytes * 1_000_000_000
|