tanthinhdt commited on
Commit
f5403ef
·
verified ·
1 Parent(s): ceafbcf

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -124,7 +124,7 @@ def main() -> None:
124
  st.sidebar.selectbox(
125
  label="Device",
126
  options=["CPU", "CUDA"],
127
- index=1,
128
  key="device",
129
  help="The device to use for inference.",
130
  )
 
124
  st.sidebar.selectbox(
125
  label="Device",
126
  options=["CPU", "CUDA"],
127
+ index=["CPU", "CUDA"].index(st.session_state.device) if "device" in st.session_state else 1,
128
  key="device",
129
  help="The device to use for inference.",
130
  )