amildravid4292 commited on
Commit
98e3cec
·
verified ·
1 Parent(s): a9de820

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -394,7 +394,7 @@ def file_upload(file, net):
394
  weights = torch.load(file.name).to(device)
395
 
396
  #pad to 10000 Principal components to keep everything consistent
397
- pcs = net.shape[1]
398
  padding = torch.zeros((1,10000-pcs)).to(device)
399
  weights = torch.cat((weights, padding), 1)
400
  net = "model_"+str(uuid.uuid4())[:4]+".pt"
 
394
  weights = torch.load(file.name).to(device)
395
 
396
  #pad to 10000 Principal components to keep everything consistent
397
+ pcs = weights.shape[1]
398
  padding = torch.zeros((1,10000-pcs)).to(device)
399
  weights = torch.cat((weights, padding), 1)
400
  net = "model_"+str(uuid.uuid4())[:4]+".pt"