Thouph commited on
Commit
d6318cb
1 Parent(s): 0beb876

Upload inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -1
inference.py CHANGED
@@ -32,7 +32,7 @@ allowed_tags.append("safe")
32
  image_path = "/path/to/your/image.jpg"
33
  start = time.time()
34
  img = Image.open(image_path).convert('RGB')
35
- tensor = transform(img).unsqueeze(0).to("cuda") # transform and add batch dimension
36
 
37
  with torch.no_grad():
38
  out = model(tensor)
 
32
  image_path = "/path/to/your/image.jpg"
33
  start = time.time()
34
  img = Image.open(image_path).convert('RGB')
35
+ tensor = transform(img).unsqueeze(0).to("cuda")
36
 
37
  with torch.no_grad():
38
  out = model(tensor)