Spaces:
Running
Running
To support zero zero-gpu
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ transform = create_transform(input_size=224, crop_pct=model.default_cfg['crop_pc
|
|
| 19 |
response = requests.get("https://git.io/JJkYN")
|
| 20 |
labels = response.text.split("\n")
|
| 21 |
|
| 22 |
-
|
| 23 |
def predict(inp):
|
| 24 |
inp = transform(inp).unsqueeze(0).to(device=device)
|
| 25 |
with torch.no_grad():
|
|
|
|
| 19 |
response = requests.get("https://git.io/JJkYN")
|
| 20 |
labels = response.text.split("\n")
|
| 21 |
|
| 22 |
+
@spaces.GPU
|
| 23 |
def predict(inp):
|
| 24 |
inp = transform(inp).unsqueeze(0).to(device=device)
|
| 25 |
with torch.no_grad():
|