Spaces:
Running
Running
Sadjad Alikhani
commited on
Update app.py
Browse files
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 |
|