akhaliq HF staff commited on
Commit
8f2277e
1 Parent(s): 740c57d

update indentation

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -55,15 +55,15 @@ Here’s we define our image classification model prediction function in PyTorch
55
  <pre>
56
  <code>def predict(inp):
57
 
58
- inp = Image.fromarray(inp.astype('uint8'), 'RGB')
 
 
 
 
59
 
60
- inp = transforms.ToTensor()(inp).unsqueeze(0)
61
 
62
- with torch.no_grad():
63
-
64
- prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
65
-
66
- return {labels[i]: float(prediction[i]) for i in range(1000)}
67
  </code>
68
  </pre>
69
  </p>
 
55
  <pre>
56
  <code>def predict(inp):
57
 
58
+ inp = Image.fromarray(inp.astype('uint8'), 'RGB')
59
+
60
+ inp = transforms.ToTensor()(inp).unsqueeze(0)
61
+
62
+ with torch.no_grad():
63
 
64
+ prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
65
 
66
+ return {labels[i]: float(prediction[i]) for i in range(1000)}
 
 
 
 
67
  </code>
68
  </pre>
69
  </p>