Sadjad Alikhani commited on
Commit
39f1325
·
verified ·
1 Parent(s): 04efe9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -441,7 +441,8 @@ def process_hdf5_file(uploaded_file, percentage):
441
  # Step 4: Load the model from lwm_model module
442
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
443
  print(f"Loading the LWM model on {device}...")
444
- model = lwm_model.LWM.from_pretrained(device=device).to(torch.float32)
 
445
 
446
  # Step 5: Load the HDF5 file and extract the channels and labels
447
  with h5py.File(uploaded_file.name, 'r') as f:
 
441
  # Step 4: Load the model from lwm_model module
442
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
443
  print(f"Loading the LWM model on {device}...")
444
+ model = lwm_model.LWM.from_pretrained(device=device)
445
+ model = model.float()
446
 
447
  # Step 5: Load the HDF5 file and extract the channels and labels
448
  with h5py.File(uploaded_file.name, 'r') as f: