Jacob Logas
commited on
app and requirements update
Browse files- app.py +2 -2
- requirements.txt +0 -2
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="
|
| 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="cpu", progress=True)
|
| 44 |
|
| 45 |
|
| 46 |
+
@spaces.GPU(duration=120)
|
| 47 |
def execute(attack, tensor_img, dir_vec):
|
| 48 |
return attack.execute(tensor_img, dir_vec, direction).detach().cpu()
|
| 49 |
|
requirements.txt
CHANGED
|
@@ -6,5 +6,3 @@ 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
|
|
|
|
| 6 |
opencv-python>=4.10.0.84
|
| 7 |
git+https://github.com/logasja/lpips-pytorch
|
| 8 |
spaces>=0.28.3
|
|
|
|
|
|