Skip to content

Commit

Permalink
fix(src/app): fix cuda not available
Browse files Browse the repository at this point in the history
  • Loading branch information
tanthinhdt committed Nov 6, 2024
1 parent 7754af6 commit 5593e70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
)
Expand Down

0 comments on commit 5593e70

Please sign in to comment.