Sadjad Alikhani commited on
Commit
06b54b2
·
verified ·
1 Parent(s): 6d6f3c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -181,7 +181,7 @@ def process_hdf5_file(uploaded_file, percentage_idx):
181
  inference = load_module_from_path("inference", inference_path)
182
 
183
  # Step 4: Load the model from lwm_model module
184
- device = 'cpu'
185
  print(f"Loading the LWM model on {device}...")
186
  model = lwm_model.LWM.from_pretrained(device=device)
187
 
 
181
  inference = load_module_from_path("inference", inference_path)
182
 
183
  # Step 4: Load the model from lwm_model module
184
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
185
  print(f"Loading the LWM model on {device}...")
186
  model = lwm_model.LWM.from_pretrained(device=device)
187