seanpedrickcase
commited on
Commit
•
2bb3ff5
1
Parent(s):
e5dfae7
Corrected references to max_queue_size and max_file_size
Browse files- app.py +4 -3
- entrypoint_router.py +3 -3
app.py
CHANGED
@@ -402,12 +402,13 @@ print(f'The value of COGNITO_AUTH is {COGNITO_AUTH}')
|
|
402 |
RUN_DIRECT_MODE = get_or_create_env_var('RUN_DIRECT_MODE', '0')
|
403 |
print(f'The value of RUN_DIRECT_MODE is {RUN_DIRECT_MODE}')
|
404 |
|
|
|
|
|
|
|
405 |
if __name__ == "__main__":
|
406 |
|
407 |
if RUN_DIRECT_MODE == "0":
|
408 |
-
|
409 |
-
max_file_size = '100mb'
|
410 |
-
|
411 |
if os.environ['COGNITO_AUTH'] == "1":
|
412 |
app.queue(max_size=max_queue_size).launch(show_error=True, auth=authenticate_user, max_file_size=max_file_size)
|
413 |
else:
|
|
|
402 |
RUN_DIRECT_MODE = get_or_create_env_var('RUN_DIRECT_MODE', '0')
|
403 |
print(f'The value of RUN_DIRECT_MODE is {RUN_DIRECT_MODE}')
|
404 |
|
405 |
+
max_queue_size = 5
|
406 |
+
max_file_size = '100mb'
|
407 |
+
|
408 |
if __name__ == "__main__":
|
409 |
|
410 |
if RUN_DIRECT_MODE == "0":
|
411 |
+
|
|
|
|
|
412 |
if os.environ['COGNITO_AUTH'] == "1":
|
413 |
app.queue(max_size=max_queue_size).launch(show_error=True, auth=authenticate_user, max_file_size=max_file_size)
|
414 |
else:
|
entrypoint_router.py
CHANGED
@@ -15,9 +15,9 @@ if __name__ == "__main__":
|
|
15 |
print(response)
|
16 |
else:
|
17 |
# Gradio App execution
|
18 |
-
from app import app # Replace with actual import if needed
|
19 |
|
20 |
if os.getenv("COGNITO_AUTH", "0") == "1":
|
21 |
-
app.queue(max_size=
|
22 |
else:
|
23 |
-
app.queue(max_size=
|
|
|
15 |
print(response)
|
16 |
else:
|
17 |
# Gradio App execution
|
18 |
+
from app import app, max_queue_size, max_file_size # Replace with actual import if needed
|
19 |
|
20 |
if os.getenv("COGNITO_AUTH", "0") == "1":
|
21 |
+
app.queue(max_size=max_queue_size).launch(show_error=True, auth=app.authenticate_user, max_file_size=max_file_size)
|
22 |
else:
|
23 |
+
app.queue(max_size=max_queue_size).launch(show_error=True, inbrowser=True, max_file_size=max_file_size)
|