Spaces:
Running
Running
add pre element
Browse files
README.md
CHANGED
@@ -36,6 +36,7 @@ All you need to do is to run this in the terminal: <code>pip install gradio</cod
|
|
36 |
</h3>
|
37 |
<p class="lg:col-span-2">
|
38 |
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):
|
|
|
39 |
<code>def predict(inp):
|
40 |
|
41 |
inp = Image.fromarray(inp.astype('uint8'), 'RGB')
|
@@ -48,6 +49,7 @@ Here’s we define our image classification model prediction function in PyTorch
|
|
48 |
|
49 |
return {labels[i]: float(prediction[i]) for i in range(1000)}
|
50 |
</code>
|
|
|
51 |
</p>
|
52 |
|
53 |
<p class="lg:col-span-2">
|
|
|
36 |
</h3>
|
37 |
<p class="lg:col-span-2">
|
38 |
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):
|
39 |
+
<pre>
|
40 |
<code>def predict(inp):
|
41 |
|
42 |
inp = Image.fromarray(inp.astype('uint8'), 'RGB')
|
|
|
49 |
|
50 |
return {labels[i]: float(prediction[i]) for i in range(1000)}
|
51 |
</code>
|
52 |
+
</pre>
|
53 |
</p>
|
54 |
|
55 |
<p class="lg:col-span-2">
|