jejunepixels commited on
Commit
7b8b533
·
verified ·
1 Parent(s): 7dccb63

Update app_environment.py

Browse files
Files changed (1) hide show
  1. 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
- return 4_000_000_000 if hosted_mode() else None
 
 
 
 
 
 
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