Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 =
|
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"
|