Jacob Logas commited on
Commit
633ad25
·
1 Parent(s): 13bbd52

Zero GPU Space

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +2 -1
app.py CHANGED
@@ -40,10 +40,10 @@ crop_size = 112
40
  scale = crop_size / 112.0
41
 
42
  for root in model_roots:
43
- torch.hub.load_state_dict_from_url(root, map_location=device, progress=True)
44
 
45
 
46
- @spaces.GPU
47
  def execute(attack, tensor_img, dir_vec):
48
  return attack.execute(tensor_img, dir_vec, direction).detach().cpu()
49
 
 
40
  scale = crop_size / 112.0
41
 
42
  for root in model_roots:
43
+ torch.hub.load_state_dict_from_url(root, map_location="device", progress=True)
44
 
45
 
46
+ @spaces.GPU()
47
  def execute(attack, tensor_img, dir_vec):
48
  return attack.execute(tensor_img, dir_vec, direction).detach().cpu()
49
 
requirements.txt CHANGED
@@ -1,9 +1,10 @@
1
  gradio>=4.38.1
2
  numpy>=2.0.0
3
  Pillow>=10.4.0
4
- torch>=2.3.1
5
  torchvision>=0.18.1
6
  tqdm>=4.66.4
7
  opencv-python>=4.10.0.84
8
  git+https://github.com/logasja/lpips-pytorch
9
  spaces>=0.28.3
 
 
 
1
  gradio>=4.38.1
2
  numpy>=2.0.0
3
  Pillow>=10.4.0
 
4
  torchvision>=0.18.1
5
  tqdm>=4.66.4
6
  opencv-python>=4.10.0.84
7
  git+https://github.com/logasja/lpips-pytorch
8
  spaces>=0.28.3
9
+ --extra-index-url https://download.pytorch.org/whl/cu113
10
+ torch