From 5593e70d3a7d7729cb5a072f21ec00e5ce421f7d Mon Sep 17 00:00:00 2001 From: tanthinhdt Date: Wed, 6 Nov 2024 10:34:58 +0700 Subject: [PATCH] fix(src/app): fix cuda not available --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 85308fd..749c726 100644 --- a/src/app.py +++ b/src/app.py @@ -124,7 +124,7 @@ def main() -> None: st.sidebar.selectbox( label="Device", options=["CPU", "CUDA"], - index=1, + index=1 if torch.cuda.is_available() else 0, key="device", help="The device to use for inference.", )