akhaliq HF staff commited on
Commit
5263fc0
·
1 Parent(s): 898a9b4

add pre tags

Browse files
Files changed (1) hide show
  1. README.md +2 -0
README.md CHANGED
@@ -49,6 +49,7 @@ All you need to do is to run this in the terminal: <code>pip install gradio</cod
49
  Here’s we define our image classification model prediction function in PyTorch (any framework, like TensorFlow, scikit-learn, JAX, or a plain Python will work as well):
50
  <pre>
51
  <code>
 
52
  def predict(inp):
53
 
54
  inp = Image.fromarray(inp.astype('uint8'), 'RGB')
@@ -60,6 +61,7 @@ Here’s we define our image classification model prediction function in PyTorch
60
  prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
61
 
62
  return {labels[i]: float(prediction[i]) for i in range(1000)}
 
63
  </code>
64
  </pre>
65
  </p>
 
49
  Here’s we define our image classification model prediction function in PyTorch (any framework, like TensorFlow, scikit-learn, JAX, or a plain Python will work as well):
50
  <pre>
51
  <code>
52
+ <pre>
53
  def predict(inp):
54
 
55
  inp = Image.fromarray(inp.astype('uint8'), 'RGB')
 
61
  prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
62
 
63
  return {labels[i]: float(prediction[i]) for i in range(1000)}
64
+ </pre>
65
  </code>
66
  </pre>
67
  </p>