Spaces:
Running
on
Zero
Running
on
Zero
Update app_demo.py
Browse files- app_demo.py +4 -0
app_demo.py
CHANGED
|
@@ -109,6 +109,7 @@ import warnings
|
|
| 109 |
|
| 110 |
warnings.filterwarnings("ignore")
|
| 111 |
|
|
|
|
| 112 |
directories = [
|
| 113 |
"downloads",
|
| 114 |
"logs",
|
|
@@ -2487,6 +2488,7 @@ def create_gui(theme, logs_in_gui=False):
|
|
| 2487 |
],
|
| 2488 |
outputs=video_output,
|
| 2489 |
trigger_mode="once",
|
|
|
|
| 2490 |
).then(
|
| 2491 |
play_sound_alert, [play_sound_gui], [sound_alert_notification]
|
| 2492 |
)
|
|
@@ -2516,6 +2518,7 @@ def create_gui(theme, logs_in_gui=False):
|
|
| 2516 |
],
|
| 2517 |
outputs=docs_output,
|
| 2518 |
trigger_mode="once",
|
|
|
|
| 2519 |
).then(
|
| 2520 |
play_sound_alert, [play_sound_gui], [sound_alert_notification]
|
| 2521 |
)
|
|
@@ -2622,4 +2625,5 @@ if __name__ == "__main__":
|
|
| 2622 |
show_error=True,
|
| 2623 |
quiet=False,
|
| 2624 |
debug=(True if logger.isEnabledFor(logging.DEBUG) else False),
|
|
|
|
| 2625 |
)
|
|
|
|
| 109 |
|
| 110 |
warnings.filterwarnings("ignore")
|
| 111 |
|
| 112 |
+
HIDE_API = bool(os.getenv("HIDE_API"))
|
| 113 |
directories = [
|
| 114 |
"downloads",
|
| 115 |
"logs",
|
|
|
|
| 2488 |
],
|
| 2489 |
outputs=video_output,
|
| 2490 |
trigger_mode="once",
|
| 2491 |
+
api_name=(False if HIDE_API else None),
|
| 2492 |
).then(
|
| 2493 |
play_sound_alert, [play_sound_gui], [sound_alert_notification]
|
| 2494 |
)
|
|
|
|
| 2518 |
],
|
| 2519 |
outputs=docs_output,
|
| 2520 |
trigger_mode="once",
|
| 2521 |
+
api_name=(False if HIDE_API else None),
|
| 2522 |
).then(
|
| 2523 |
play_sound_alert, [play_sound_gui], [sound_alert_notification]
|
| 2524 |
)
|
|
|
|
| 2625 |
show_error=True,
|
| 2626 |
quiet=False,
|
| 2627 |
debug=(True if logger.isEnabledFor(logging.DEBUG) else False),
|
| 2628 |
+
show_api=(not HIDE_API),
|
| 2629 |
)
|